Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • autinerd/experimental-openwrt-24.10
  • experimental
  • feature/addMikrotikwAP
  • master
  • nrb/airmax-test
  • nrb/ar9344-reset-sequence
  • nrb/ex400-remove-wps
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • v2022.1.3-ffs
  • v2022.1.4-ffs
  • v2023.1-ffs
  • v2023.2-ffs
  • v2023.2.2-ffs
  • v2023.2.3-ffs
  • v2023.2.4-ffs
  • v2023.2.5-ffs
  • experimental-2022-09-24
  • experimental-2022-09-24-base
  • experimental-2023-03-11
  • experimental-2023-03-11-base
  • experimental-2023-03-12
  • experimental-2023-03-12-base
  • experimental-2023-03-16
  • experimental-2023-03-16-base
  • experimental-2023-03-20
  • experimental-2023-03-20-base
  • experimental-2023-03-23
  • experimental-2023-03-23-base
  • experimental-2023-03-25
  • experimental-2023-03-25-base
  • experimental-2023-03-26
  • experimental-2023-03-26-base
  • experimental-2023-03-30
  • experimental-2023-03-30-base
  • experimental-2023-03-31
  • experimental-2023-03-31-base
  • experimental-2023-04-01
  • experimental-2023-04-01-base
  • experimental-2023-04-08
  • experimental-2023-04-08-base
  • experimental-2023-04-10
  • experimental-2023-04-10-base
  • experimental-2023-04-13
  • experimental-2023-04-13-base
  • experimental-2023-04-15
  • experimental-2023-04-15-base
  • experimental-2023-04-16
  • experimental-2023-04-16-base
  • experimental-2023-04-18
  • experimental-2023-04-18-base
  • experimental-2023-04-20
  • experimental-2023-04-20-base
  • experimental-2023-04-26
  • experimental-2023-04-26-base
  • experimental-2023-04-28
  • experimental-2023-04-28-base
  • experimental-2023-04-30
  • experimental-2023-04-30-base
  • experimental-2023-05-02
  • experimental-2023-05-02-base
  • experimental-2023-05-03
  • experimental-2023-05-03-base
  • experimental-2023-05-12
  • experimental-2023-05-12-base
  • experimental-2023-05-21
  • experimental-2023-05-21-base
  • experimental-2023-05-25
  • experimental-2023-05-25-base
  • experimental-2023-07-02
  • experimental-2023-07-02-base
  • experimental-2023-07-04
  • experimental-2023-07-04-base
  • experimental-2023-07-12
  • experimental-2023-07-12-base
  • experimental-2023-07-16
  • experimental-2023-07-16-base
  • experimental-2023-08-04
  • experimental-2023-08-04-base
  • experimental-2023-08-10
  • experimental-2023-08-10-base
  • experimental-2023-09-08
  • experimental-2023-09-08-base
  • experimental-2023-09-09
  • experimental-2023-09-09-base
  • experimental-2023-09-10
  • experimental-2023-09-10-base
  • experimental-2023-09-11
  • experimental-2023-09-11-base
  • experimental-2023-09-12
  • experimental-2023-09-12-base
  • experimental-2023-09-13
  • experimental-2023-09-13-base
  • experimental-2023-09-15
  • experimental-2023-09-15-base
  • experimental-2023-09-16
  • experimental-2023-09-16-base
  • experimental-2023-09-18
  • experimental-2023-09-18-base
  • experimental-2023-09-20
  • experimental-2023-09-20-base
  • experimental-2023-09-27
  • experimental-2023-09-27-base
  • experimental-2023-09-28
  • experimental-2023-09-28-base
  • experimental-2023-09-29
  • experimental-2023-09-29-base
  • experimental-2023-10-02
  • experimental-2023-10-02-base
  • experimental-2023-10-13
  • experimental-2023-10-13-base
  • experimental-2023-10-14
  • experimental-2023-10-14-base
  • experimental-2023-10-16
  • experimental-2023-10-16-base
  • experimental-2023-10-23
  • experimental-2023-10-23-base
137 results

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • 2014.3.x
  • 2014.4.x
  • babel
  • experimental
  • hoodselector
  • master
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • radv-filterd
  • v2015.1.x
  • v2016.1.x
  • v2016.2.4-batmanbug
  • v2016.2.x
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2018.2.x
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2020.2.x
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.3.1
  • v2014.4
  • v2015.1
  • v2015.1.1
  • v2015.1.2
  • v2016.1
  • v2016.1.1
  • v2016.1.2
  • v2016.1.3
  • v2016.1.4
  • v2016.1.5
  • v2016.1.6
  • v2016.2
  • v2016.2.1
  • v2016.2.2
  • v2016.2.3
  • v2016.2.4
  • v2016.2.5
  • v2016.2.6
  • v2016.2.7
  • v2017.1
  • v2017.1.1
  • v2017.1.2
  • v2017.1.3
  • v2017.1.4
  • v2017.1.5
  • v2017.1.6
  • v2017.1.7
  • v2017.1.8
  • v2018.1
  • v2018.1.1
  • v2018.1.2
  • v2018.1.3
  • v2018.1.4
  • v2018.2
  • v2018.2-ffs0.1
  • v2018.2.1
  • v2018.2.1-ffs0.1
  • v2018.2.2-ffs0.1
  • v2018.2.3-ffs0.1
  • v2019.1-ffs0.1
  • v2019.1.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2020.1-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.2
  • v2020.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.3-ffs0.1
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.3
  • v2020.2.x-ffs0.1
  • v2021.1-ffs0.1
  • v2021.1.1-ffs0.1
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.4
  • v2021.1.2-ffs0.1
  • v2021.1.2-ffs0.2
98 results
Show changes
Showing
with 314 additions and 120 deletions
...@@ -12,8 +12,8 @@ You may obtain a copy of the License at ...@@ -12,8 +12,8 @@ You may obtain a copy of the License at
local util = require 'gluon.util' local util = require 'gluon.util'
local site = require 'gluon.site' local site = require 'gluon.site'
local sp = util.subprocess
local fcntl = require 'posix.fcntl'
local unistd = require 'posix.unistd' local unistd = require 'posix.unistd'
local wait = require 'posix.sys.wait' local wait = require 'posix.sys.wait'
...@@ -51,7 +51,7 @@ end ...@@ -51,7 +51,7 @@ end
local f_password = Form(translate("Password"), translate( local f_password = Form(translate("Password"), translate(
"Alternatively, you can set a password to access your node. Please choose a " "Alternatively, you can set a password to access your node. Please choose a "
.. "secure password you don't use anywhere else.<br /><br />If you set an empty " .. "secure password you don't use anywhere else.<br><br>If you set an empty "
.. "password, login via password will be disabled. This is the default." .. "password, login via password will be disabled. This is the default."
), 'password' ), 'password'
) )
...@@ -76,29 +76,16 @@ function pw2.cfgvalue() ...@@ -76,29 +76,16 @@ function pw2.cfgvalue()
end end
local function set_password(password) local function set_password(password)
local inr, inw = unistd.pipe() local options = {
local pid = unistd.fork() stdin = sp.PIPE,
stdout = sp.DEVNULL,
if pid < 0 then stderr = sp.DEVNULL,
}
local pid, pipe = sp.popen('passwd', {}, options)
if not pid then
return false return false
elseif pid == 0 then
unistd.close(inw)
local null = fcntl.open('/dev/null', fcntl.O_WRONLY)
unistd.dup2(null, unistd.STDOUT_FILENO)
unistd.dup2(null, unistd.STDERR_FILENO)
if null > 2 then
unistd.close(null)
end end
local inw = pipe.stdin
unistd.dup2(inr, unistd.STDIN_FILENO)
unistd.close(inr)
unistd.execp('passwd', {[0] = 'passwd'})
os.exit(127)
end
unistd.close(inr)
unistd.write(inw, string.format('%s\n%s\n', password, password)) unistd.write(inw, string.format('%s\n%s\n', password, password))
unistd.close(inw) unistd.close(inw)
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-autoupdater PKG_NAME:=gluon-web-autoupdater
PKG_VERSION:=1
PKG_RELEASE:=1
include ../gluon.mk include ../gluon.mk
......
--[[ -- SPDX-FileCopyrightText: 2013 Nils Schneider <nils@nilsschneider.net>
Copyright 2013 Nils Schneider <nils@nilsschneider.net> -- SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local uci = require("simple-uci").cursor() local uci = require("simple-uci").cursor()
local autoupdater = uci:get_first("autoupdater", "autoupdater") local autoupdater = uci:get_first("autoupdater", "autoupdater")
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-cellular
include ../gluon.mk
define Package/gluon-web-cellular
DEPENDS:=+gluon-web-admin
TITLE:=UI for activating cellular WAN
endef
$(eval $(call BuildPackageGluon,gluon-web-cellular))
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2023-01-23 13:33+0100\n"
"Last-Translator: Tom Herbers <mail@tomherbers.de>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "APN"
msgstr ""
msgid "Cellular"
msgstr ""
msgid "Enabled"
msgstr "Aktiviert"
msgid "IPv4"
msgstr ""
msgid "IPv4/IPv6"
msgstr ""
msgid "IPv6"
msgstr ""
msgid "Password"
msgstr "Passwort"
msgid "SIM PIN"
msgstr ""
msgid "Type"
msgstr "Typ"
msgid "Username"
msgstr "Nutzername"
msgid ""
"You can enable uplink via cellular service. If you decide so, the VPN "
"connection is established using the integrated WWAN modem."
msgstr ""
"Du kannst den Uplink über einen Mobilfunk Service aktivieren. Wenn du "
"dich dafür entscheidest, wird die VPN-Verbindung über das integrierte "
"Mobilfunk-Modem hergestellt."
msgid "Authentication"
msgstr "Authentifizierung"
msgid "None"
msgstr "Keine"
msgid "PAP"
msgstr ""
msgid "CHAP"
msgstr ""
msgid "Both"
msgstr "Beide"
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "APN"
msgstr ""
msgid "Cellular"
msgstr ""
msgid "Enabled"
msgstr ""
msgid "IPv4"
msgstr ""
msgid "IPv4/IPv6"
msgstr ""
msgid "IPv6"
msgstr ""
msgid "Password"
msgstr ""
msgid "SIM PIN"
msgstr ""
msgid "Type"
msgstr ""
msgid "Username"
msgstr ""
msgid ""
"You can enable uplink via cellular service. If you decide so, the VPN "
"connection is established using the integrated WWAN modem."
msgstr ""
msgid "Authentication"
msgstr ""
msgid "None"
msgstr ""
msgid "PAP"
msgstr ""
msgid "CHAP"
msgstr ""
msgid "Both"
msgstr ""
local platform = require 'gluon.platform'
package 'gluon-web-cellular'
if platform.is_cellular_device() then
entry({"admin", "cellular"}, model("admin/cellular"), _("Cellular"), 30)
end
local uci = require("simple-uci").cursor()
local f = Form(translate("Cellular"))
local s = f:section(Section, nil, translate(
'You can enable uplink via cellular service. If you decide so, the VPN connection is established '
.. 'using the integrated WWAN modem.'
))
local enabled = s:option(Flag, "enabled", translate("Enabled"))
enabled.default = uci:get('gluon', 'cellular') and uci:get_bool('gluon', 'cellular', 'enabled')
local pin = s:option(Value, "pin", translate("SIM PIN"))
pin:depends(enabled, true)
pin.default = uci:get('gluon', 'cellular', 'pin')
local apn = s:option(Value, "apn", translate("APN"))
apn:depends(enabled, true)
apn.default = uci:get('gluon', 'cellular', 'apn')
local pdptype = s:option(ListValue, "type", translate("Type"))
pdptype:depends(enabled, true)
pdptype:value("IP", translate("IPv4"))
pdptype:value("IPV6", translate("IPv6"))
pdptype:value("IPV4V6", translate("IPv4/IPv6"))
pdptype.default = uci:get('gluon', 'cellular', 'pdptype') or "IP"
local username = s:option(Value, "username", translate("Username"))
username:depends(enabled, true)
username.default = uci:get('gluon', 'cellular', 'username')
local password = s:option(Value, "password", translate("Password"))
password:depends(enabled, true)
password.default = uci:get('gluon', 'cellular', 'password')
local auth = s:option(ListValue, "auth", translate("Authentication"))
auth:depends(enabled, true)
auth:value("none", translate("None"))
auth:value("pap", translate("PAP"))
auth:value("chap", translate("CHAP"))
auth:value("both", translate("Both"))
auth.default = uci:get('gluon', 'cellular', 'auth') or "none"
function f:write()
local cellular_enabled = false
if enabled.data then
cellular_enabled = true
end
uci:section('gluon', 'cellular', 'cellular', {
enabled = cellular_enabled,
apn = apn.data,
pdptype = pdptype.data,
pin = pin.data,
username = username.data,
password = password.data,
auth = auth.data,
})
uci:commit('gluon')
end
return f
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-logging PKG_NAME:=gluon-web-logging
PKG_VERSION:=1
PKG_RELEASE:=1
include ../gluon.mk include ../gluon.mk
......
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-mesh-vpn-fastd PKG_NAME:=gluon-web-mesh-vpn-fastd
PKG_VERSION:=1
PKG_RELEASE:=1
include ../gluon.mk include ../gluon.mk
......
<div class="gluon-value"> <div class="gluon-value">
<div class="gluon-value-title"> <div class="gluon-value-title">
<input class="gluon-input-radio" data-update="change" type="radio" value="security"<%= attr("id", id..'.1') .. attr("name", id) .. attr("checked", ((self:cfgvalue() or self.default) == "security") and "checked") %> /> <input data-update="change" type="radio" value="security"<%= attr("id", id..'.1') .. attr("name", id) .. attr("checked", ((self:cfgvalue() or self.default) == "security") and "checked") %>>
<label<%= attr("for", id..'.1')%>></label> <label<%= attr("for", id..'.1')%>></label>
</div> </div>
<div class="gluon-value-field-long"> <div class="gluon-value-field-long">
<label<%= attr("for", id..'.1') %> class="gluon-value-title"><%:Security mode%></label> <label<%= attr("for", id..'.1') %> class="gluon-value-title"><%:Security mode%></label>
<br /> <br>
<%| translate( <%| translate(
'In security mode, the mesh VPN uses an encrypted tunnel to connect to the VPN servers. ' .. 'In security mode, the mesh VPN uses an encrypted tunnel to connect to the VPN servers. ' ..
'The encryption ensures that it is impossible for your internet access provider to see what ' .. 'The encryption ensures that it is impossible for your internet access provider to see what ' ..
'data is exchanged over your node.' 'data is exchanged over your node.'
) %> ) %>
<br /> <br>
</div> </div>
<div class="gluon-value-field-long-after"></div> <div class="gluon-value-field-long-after"></div>
</div> </div>
<div class="gluon-value gluon-value-last"> <div class="gluon-value gluon-value-last">
<div class="gluon-value-title"> <div class="gluon-value-title">
<input class="gluon-input-radio" data-update="change" type="radio" value="performance"<%= attr("id", id..'.2') .. attr("name", id) .. attr("checked", ((self:cfgvalue() or self.default) == "performance") and "checked") %> /> <input data-update="change" type="radio" value="performance"<%= attr("id", id..'.2') .. attr("name", id) .. attr("checked", ((self:cfgvalue() or self.default) == "performance") and "checked") %>>
<label<%= attr("for", id..'.2')%>></label> <label<%= attr("for", id..'.2')%>></label>
</div> </div>
<div class="gluon-value-field-long"> <div class="gluon-value-field-long">
<label<%= attr("for", id..'.2') %> class="gluon-value-title"><%:Performance mode%></label> <label<%= attr("for", id..'.2') %> class="gluon-value-title"><%:Performance mode%></label>
<br /> <br>
<%| translate( <%| translate(
'In performance mode, no encryption is used. This usually allows for higher throughput, but the data exchanged over your node is not ' .. 'In performance mode, no encryption is used. This usually allows for higher throughput, but the data exchanged over your node is not ' ..
'protected against eavesdropping.' 'protected against eavesdropping.'
) %> ) %>
<br /> <br>
</div> </div>
<div class="gluon-value-field-long-after"></div> <div class="gluon-value-field-long-after"></div>
</div> </div>
...@@ -10,7 +10,7 @@ mode.package = "gluon-web-mesh-vpn-fastd" ...@@ -10,7 +10,7 @@ mode.package = "gluon-web-mesh-vpn-fastd"
mode.template = "mesh-vpn-fastd" mode.template = "mesh-vpn-fastd"
local methods = uci:get('fastd', 'mesh_vpn', 'method') local methods = uci:get('fastd', 'mesh_vpn', 'method')
if util.contains(methods, 'null') then if util.contains(methods, 'null@l2tp') or util.contains(methods, 'null') then
-- performance mode will only be used as default, if it is present in site.mesh_vpn.fastd.methods -- performance mode will only be used as default, if it is present in site.mesh_vpn.fastd.methods
mode.default = 'performance' mode.default = 'performance'
else else
...@@ -24,11 +24,12 @@ function mode:write(data) ...@@ -24,11 +24,12 @@ function mode:write(data)
-- if performance mode was selected, and the method 'null' was not present in the original table, it will be added -- if performance mode was selected, and the method 'null' was not present in the original table, it will be added
local site_methods = {} local site_methods = {}
if data == 'performance' then if data == 'performance' then
table.insert(site_methods, 'null@l2tp')
table.insert(site_methods, 'null') table.insert(site_methods, 'null')
end end
for _, method in ipairs(site.mesh_vpn.fastd.methods()) do for _, method in ipairs(site.mesh_vpn.fastd.methods()) do
if method ~= 'null' then if method ~= 'null@l2tp' and method ~= 'null' then
table.insert(site_methods, method) table.insert(site_methods, method)
end end
end end
......
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-model PKG_NAME:=gluon-web-model
PKG_VERSION:=1
include ../gluon.mk include ../gluon.mk
...@@ -10,4 +9,17 @@ define Package/gluon-web-model ...@@ -10,4 +9,17 @@ define Package/gluon-web-model
DEPENDS:=+gluon-web DEPENDS:=+gluon-web
endef endef
PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY
define Package/gluon-web-model/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon/web/www/static/
ifdef CONFIG_GLUON_MINIFY
$(INSTALL_DATA) ./javascript/gluon-web-model.min.js $(1)/lib/gluon/web/www/static/gluon-web-model.js
else
$(INSTALL_DATA) ./javascript/gluon-web-model.js $(1)/lib/gluon/web/www/static/
endif
endef
$(eval $(call BuildPackageGluon,gluon-web-model)) $(eval $(call BuildPackageGluon,gluon-web-model))
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<% <%
for i, val in ipairs(self:cfgvalue()) do for i, val in ipairs(self:cfgvalue()) do
%> %>
<input class="gluon-input-text" value="<%|val%>" data-update="change" type="text"<%= <input value="<%|val%>" data-update="change" type="text"<%=
attr("id", id .. "." .. i) .. attr("id", id .. "." .. i) ..
attr("name", id) .. attr("name", id) ..
attr("size", self.size) .. attr("size", self.size) ..
attr("placeholder", self.placeholder) attr("placeholder", self.placeholder)
%> /><br /> %>><br>
<% end %> <% end %>
</div> </div>
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" data-update="reset"> <form method="post" enctype="multipart/form-data" action="<%|url(request)%>" data-update="reset">
<input type="hidden" name="token" value="<%=token%>" /> <input type="hidden" name="<%=id%>" value="1">
<input type="hidden" name="<%=id%>" value="1" />
<div class="gluon-form" id="form-<%=id%>"> <div class="gluon-form" id="form-<%=id%>">
<% if self.title and #self.title > 0 then %><h2 name="content"><%|self.title%></h2><% end %> <% if self.title and #self.title > 0 then %><h2 name="content"><%|self.title%></h2><% end %>
<% if self.description and #self.description > 0 then %><div class="gluon-form-descr"><%=self.description%></div><% end %> <% if self.description and #self.description > 0 then %><div class="gluon-form-descr"><%=self.description%></div><% end %>
<% self:render_children(renderer) %> <% self:render_children(renderer, scope) %>
</div> </div>
<%- if self.message then %> <%- if self.message then %>
<div><%|self.message%></div> <div><%|self.message%></div>
...@@ -17,12 +16,12 @@ ...@@ -17,12 +16,12 @@
<%- if self.submit ~= false then %> <%- if self.submit ~= false then %>
<input class="gluon-button gluon-button-submit" type="submit" value=" <input class="gluon-button gluon-button-submit" type="submit" value="
<%- if not self.submit then -%><%-:Save-%><%-else-%><%|self.submit%><%end-%> <%- if not self.submit then -%><%-:Save-%><%-else-%><%|self.submit%><%end-%>
" /> ">
<% end %> <% end %>
<%- if self.reset ~= false then %> <%- if self.reset ~= false then %>
<input class="gluon-button gluon-button-reset" type="reset" value=" <input class="gluon-button gluon-button-reset" type="reset" value="
<%- if not self.reset then -%><%-:Reset-%><%-else-%><%|self.reset%><%end-%> <%- if not self.reset then -%><%-:Reset-%><%-else-%><%|self.reset%><%end-%>
" /> ">
<% end %> <% end %>
</div> </div>
</form> </form>
<input class="gluon-input-checkbox" data-update="click change" type="checkbox" value="1"<%= <input data-update="click change" type="checkbox" value="1"<%=
attr("id", id) .. attr("name", id) .. attr("id", id) .. attr("name", id) ..
attr("checked", self:cfgvalue() and "checked") attr("checked", self:cfgvalue() and "checked")
%> /> %>>
<label<%= attr("for", id)%>></label> <label<%= attr("for", id)%>></label>
<% <%
local br = self.orientation == "horizontal" and '&#160;&#160;&#160;' or '<br />' local br = self.orientation == "horizontal" and '&#160;&#160;&#160;' or '<br>'
local entries = self:entries() local entries = self:entries()
%> %>
<% if self.widget == "select" then %> <% if self.widget == "select" then %>
<select class="gluon-input-select" data-update="change"<%= <div class="select-wrapper">
<select data-update="change"<%=
attr("id", id) .. attr("id", id) ..
attr("name", id) .. attr("name", id) ..
attr("size", self.size) .. attr("size", self.size) ..
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
%>><%|entry.value%></option> %>><%|entry.value%></option>
<%- end %> <%- end %>
</select> </select>
</div>
<% elseif self.widget == "radio" then %> <% elseif self.widget == "radio" then %>
<div> <div>
<% for i, entry in pairs(entries) do %> <% for i, entry in pairs(entries) do %>
...@@ -28,12 +30,12 @@ ...@@ -28,12 +30,12 @@
attr("data-index", i) .. attr("data-index", i) ..
attr("data-depends", self:deplist(entry.deps)) attr("data-depends", self:deplist(entry.deps))
%>> %>>
<input class="gluon-input-radio" data-update="click change" type="radio"<%= <input data-update="click change" type="radio"<%=
attr("id", id.."."..entry.key) .. attr("id", id.."."..entry.key) ..
attr("name", id) .. attr("name", id) ..
attr("value", entry.key) .. attr("value", entry.key) ..
attr("checked", (self:cfgvalue() == entry.key) and "checked") attr("checked", (self:cfgvalue() == entry.key) and "checked")
%> /> %>>
<label<%= attr("for", id.."."..entry.key)%>></label> <label<%= attr("for", id.."."..entry.key)%>></label>
<%|entry.value%> <%|entry.value%>
</label> </label>
......
<%
local br = self.orientation == "horizontal" and '&#160;&#160;&#160;' or '<br>'
local entries = self:entries()
local util = require 'gluon.util'
%>
<div>
<% for i, entry in pairs(entries) do %>
<label<%=
attr("data-index", i) ..
attr("data-depends", self:deplist(entry.deps))
%>>
<input data-update="click change" type="checkbox"<%=
attr("id", id.."."..entry.key) ..
attr("name", id) ..
attr("value", entry.key) ..
attr("checked", (util.contains(self:cfgvalue(), entry.key)) and "checked") ..
attr("data-exclusive-with", self.exclusions[entry.key]) ..
attr("data-update", "change")
%>>
<label<%= attr("for", id.."."..entry.key)%>></label>
<span class="gluon-multi-list-option-descr"><%|entry.value%></span>
</label>
<% if i ~= #entries then write(br) end %>
<% end %>
</div>
<fieldset class="gluon-section"> <fieldset class="gluon-section" id="<%=id%>" data-index="<%=self.index%>"<%= attr("data-depends", self:deplist()) %>>
<% if self.title and #self.title > 0 then -%> <% if self.title and #self.title > 0 then -%>
<legend><%|self.title%></legend> <legend><%|self.title%></legend>
<%- end %> <%- end %>
<% if self.description and #self.description > 0 then -%> <% if self.description and #self.description > 0 then -%>
<div class="gluon-section-descr"><%=self.description%></div> <div class="gluon-section-descr"><%=self.description%></div>
<%- end %> <%- end %>
<div class="gluon-section-node"> <div class="gluon-section-node" id="section-<%=id%>">
<div id="section-<%=id%>">
<% self:render_children(renderer, scope) %> <% self:render_children(renderer, scope) %>
</div> </div>
<% if self.error and self.error[1] then -%>
<div class="gluon-section-error">
<ul><% for _, e in ipairs(self.error[1]) do -%>
<li>
<%- if e == "invalid" then -%>
<%:One or more fields contain invalid values!%>
<%- elseif e == "missing" then -%>
<%:One or more required fields have no value!%>
<%- else -%>
<%|e%>
<%- end -%>
</li>
<%- end %></ul>
</div>
<%- end %>
</div>
</fieldset> </fieldset>
<textarea class="gluon-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", id) .. attr("id", id) .. attr("rows", self.rows) .. attr("wrap", self.wrap) %>> <textarea <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", id) .. attr("id", id) .. attr("rows", self.rows) .. attr("wrap", self.wrap) %>>
<%-|self:cfgvalue()-%> <%-|self:cfgvalue()-%>
</textarea> </textarea>