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 151 additions and 121 deletions
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Enable"
msgstr ""
msgid "IP"
msgstr ""
msgid "" msgid ""
"If you want to use a remote syslog server, you can set it up here. " "If you want to use a remote syslog server, you can set it up here. Please "
"Please keep in mind that the data is not encrypted, which may cause " "keep in mind that the data is not encrypted, which may cause individual-"
"individual-related data to be transmitted unencrypted over the internet." "related data to be transmitted unencrypted over the internet."
msgstr "" msgstr ""
msgid "Logging" msgid "Logging"
msgstr "" msgstr ""
msgid "Port"
msgstr ""
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>
...@@ -15,18 +15,18 @@ msgid "" ...@@ -15,18 +15,18 @@ msgid ""
"throughput, but the data exchanged over your node is not protected against " "throughput, but the data exchanged over your node is not protected against "
"eavesdropping." "eavesdropping."
msgstr "" msgstr ""
"Im Modus „Hohe Geschwindigkeit“ wird auf Verschlüsselung " "Im Modus „Hohe Geschwindigkeit“ wird auf Verschlüsselung verzichtet. Dies "
"verzichtet. Dies erlaubt häufig eine höhere Bandbreite als mit " "erlaubt häufig eine höhere Bandbreite als mit Verschlüsselung, aber die "
"Verschlüsselung, aber die Verbindung ist nicht gegen Abhören geschützt." "Verbindung ist nicht gegen Abhören geschützt."
msgid "" msgid ""
"In security mode, the mesh VPN uses an encrypted tunnel to connect to the " "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 " "VPN servers. The encryption ensures that it is impossible for your internet "
"access provider to see what data is exchanged over your node." "access provider to see what data is exchanged over your node."
msgstr "" msgstr ""
"Im Modus „Hohe Sicherheit“ wird ein verschlüsselter Tunnel " "Im Modus „Hohe Sicherheit“ wird ein verschlüsselter Tunnel verwendet. Dies "
"verwendet. Dies schließt aus, dass dein Internetzugangsprovider herausfinden " "schließt aus, dass dein Internetzugangsprovider herausfinden kann, was für "
"kann, was für Daten über deinen Knoten übertragen werden." "Daten über deinen Knoten übertragen werden."
msgid "Mesh VPN" msgid "Mesh VPN"
msgstr "Mesh-VPN" msgstr "Mesh-VPN"
......
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-19 20:20+0100\n" "PO-Revision-Date: 2015-08-19 20:20+0100\n"
"Last-Translator: Bernot Tobias <tqbs@airmail.cc>\n" "Last-Translator: Bernot Tobias <tqbs@airmail.cc>\n"
"Language-Team: French\n" "Language-Team: French\n"
"Language: fr\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
...@@ -15,8 +15,9 @@ msgid "" ...@@ -15,8 +15,9 @@ msgid ""
"throughput, but the data exchanged over your node is not protected against " "throughput, but the data exchanged over your node is not protected against "
"eavesdropping." "eavesdropping."
msgstr "" msgstr ""
"En mode performance, aucune encryption est utilisé. Ceci permet un débit plus " "En mode performance, aucune encryption est utilisé. Ceci permet un débit "
"élevé, mais toutes les données échangées ne sont pas protégées contre l'écoute." "plus élevé, mais toutes les données échangées ne sont pas protégées contre "
"l'écoute."
msgid "" msgid ""
"In security mode, the mesh VPN uses an encrypted tunnel to connect to the " "In security mode, the mesh VPN uses an encrypted tunnel to connect to the "
......
local uci = require("simple-uci").cursor() local uci = require("simple-uci").cursor()
local util = gluon.util local util = require 'gluon.util'
local f = Form(translate('Mesh VPN')) local f = Form(translate('Mesh VPN'))
...@@ -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
...@@ -20,20 +20,21 @@ end ...@@ -20,20 +20,21 @@ end
function mode:write(data) function mode:write(data)
local site = require 'gluon.site' local site = require 'gluon.site'
-- methods will be recreated and filled with the original values from site.mesh_vpn.fastd.methods -- site_methods will be recreated and filled with the original values from site.mesh_vpn.fastd.methods
-- 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 methods = {} local site_methods = {}
if data == 'performance' then if data == 'performance' then
table.insert(methods, 'null') table.insert(site_methods, 'null@l2tp')
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(methods, method) table.insert(site_methods, method)
end end
end end
uci:set('fastd', 'mesh_vpn', 'method', methods) uci:set('fastd', 'mesh_vpn', 'method', site_methods)
uci:save('fastd') uci:save('fastd')
uci:commit('fastd') uci:commit('fastd')
......
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)%>"> <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-map" id="gluon-<%=self.config%>"> <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-map-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>
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
attr("id", id) .. attr("id", id) ..
attr("name", id) .. attr("name", id) ..
attr("type", self.password and "password" or "text") .. attr("type", self.password and "password" or "text") ..
attr("class", self.password and "gluon-input-password" or "gluon-input-text") ..
attr("value", self:cfgvalue()) .. attr("value", self:cfgvalue()) ..
attr("size", self.size) .. attr("size", self.size) ..
attr("placeholder", self.placeholder) .. attr("placeholder", self.placeholder) ..
attr("maxlength", self.maxlength) .. attr("maxlength", self.maxlength) ..
attr("data-type", self.datatype) .. attr("data-type", self.datatype) ..
attr("data-optional", self.datatype and self.optional) attr("data-optional", self.datatype and self.optional)
%> /> %>>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<%- end -%> <%- end -%>
<% if self.subtemplate then include(self.subtemplate) end %> <% if self.subtemplate then include(self.subtemplate) end %>
<% if self.description and #self.description > 0 then -%> <% if self.description and #self.description > 0 then -%>
<br /> <br>
<div class="gluon-value-description"> <div class="gluon-value-description">
<%=self.description%> <%=self.description%>
</div> </div>
......
<%- if not self.hide then -%>
<div class="gluon-warning"<%=
attr("id", id) ..
attr("data-index", self.index) ..
attr("data-depends", self:deplist(self.deps))
%>>
<%- if self.content then -%>
<%= self.content %>
<%- else -%>
<b><%= self.title %></b><br>
<%= self.description %>
<%- end -%>
</div>
<%- end -%>
!function(){var e={};function t(e){return/^-?\d+$/.test(e)?+e:NaN}function n(e){return/^-?\d*\.?\d+?$/.test(e)?+e:NaN}var a={integer:function(){return!isNaN(t(this))},uinteger:function(){return t(this)>=0},float:function(){return!isNaN(n(this))},ufloat:function(){return n(this)>=0},ipaddr:function(){return a.ip4addr.apply(this)||a.ip6addr.apply(this)},ip4addr:function(){var e;return!!(e=this.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/))&&(e[1]>=0&&e[1]<=255&&e[2]>=0&&e[2]<=255&&e[3]>=0&&e[3]<=255&&e[4]>=0&&e[4]<=255)},ip6addr:function(){return this.indexOf("::")<0?null!=this.match(/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i):!(this.indexOf(":::")>=0||this.match(/::.+::/)||this.match(/^:[^:]/)||this.match(/[^:]:$/))&&(!!this.match(/^(?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}$/i)||(!!this.match(/^(?:[a-f0-9]{1,4}:){7}:$/i)||!!this.match(/^:(?::[a-f0-9]{1,4}){7}$/i)))},wpakey:function(){var e=this;return 64==e.length?null!=e.match(/^[a-f0-9]{64}$/i):e.length>=8&&e.length<=63},range:function(e,t){var a=n(this);return a>=+e&&a<=+t},min:function(e){return n(this)>=+e},max:function(e){return n(this)<=+e},irange:function(e,n){var a=t(this);return a>=+e&&a<=+n},imin:function(e){return t(this)>=+e},imax:function(e){return t(this)<=+e},minlength:function(e){return(""+this).length>=+e},maxlength:function(e){return(""+this).length<=+e}};function r(e){for(var t=0;t<e.length;t++){var n=!0;for(var a in e[t])n=n&&(r=a,i=e[t][a],o=void 0,(o=document.getElementById(r))?("checkbox"==o.type?o.checked:o.value?o.value:"")==i:!!(o=document.getElementById(r+"."+i))&&"radio"==o.type&&o.checked);if(n)return!0}var r,i,o;return!1}function i(){var t=!1;for(var n in e){var a=e[n],o=document.getElementById(n),d=document.getElementById(a.parent);if(o&&o.parentNode&&!r(a.deps))o.parentNode.removeChild(o),t=!0;else if(d&&(!o||!o.parentNode)&&r(a.deps)){var u=void 0;for(u=d.firstChild;u&&!(u.getAttribute&&parseInt(u.getAttribute("data-index"),10)>a.index);u=u.nextSibling);u?d.insertBefore(a.node,u):d.appendChild(a.node),t=!0}d&&d.parentNode&&d.getAttribute("data-optionals")&&(d.parentNode.style.display=d.options.length<=1?"none":"")}t&&i()}function o(e,t,n,a){return e.addEventListener?e.addEventListener(t,n,!!a):e.attachEvent("on"+t,function(){var e=window.event;return!e.target&&e.srcElement&&(e.target=e.srcElement),!!n(e)}),e}function d(e,t){var n=t.prefix;function a(a,l,s){for(var c=[];e.firstChild;){var p=e.firstChild;(f=+p.index)!=s&&("input"==p.nodeName.toLowerCase()?c.push(p.value||""):"select"==p.nodeName.toLowerCase()&&(c[c.length-1]=p.options[p.selectedIndex].value)),e.removeChild(p)}l>=0?(a=l+1,c.splice(l,0,"")):t.optional||0!=c.length||c.push("");for(var f=1;f<=c.length;f++){var v=document.createElement("input");if(v.id=n+"."+f,v.name=n,v.value=c[f-1],v.type="text",v.index=f,v.className="gluon-input-text",t.size&&(v.size=t.size),t.placeholder&&(v.placeholder=t.placeholder),e.appendChild(v),t.type&&u(v,!1,t.type),o(v,"keydown",i),o(v,"keypress",r),f==a)v.focus();else if(-f==a){v.focus();var h=v.value;v.value=" ",v.value=h}if(t.optional||c.length>1)(m=document.createElement("span")).className="gluon-remove",e.appendChild(m),o(m,"click",d(!1)),e.appendChild(document.createElement("br"))}var m;(m=document.createElement("span")).className="gluon-add",e.appendChild(m),o(m,"click",d(!0))}function r(e){var t=(e=e||window.event).target?e.target:e.srcElement;switch(3==t.nodeType&&(t=t.parentNode),e.keyCode){case 8:case 46:return 0!=t.value.length||(e.preventDefault&&e.preventDefault(),!1);case 13:case 38:case 40:return e.preventDefault&&e.preventDefault(),!1}return!0}function i(e){var t,r,i=(e=e||window.event).target?e.target:e.srcElement,o=0;if(i){for(3==i.nodeType&&(i=i.parentNode),o=i.index,t=i.previousSibling;t&&t.name!=n;)t=t.previousSibling;for(r=i.nextSibling;r&&r.name!=n;)r=r.nextSibling}switch(e.keyCode){case 8:case 46:if("select"==i.nodeName.toLowerCase()||0==i.value.length){e.preventDefault&&e.preventDefault();var d=i.index;return 8==e.keyCode&&(d=1-d),a(d,-1,o),!1}break;case 13:a(-1,o,-1);break;case 38:t&&t.focus();break;case 40:r&&r.focus()}return!0}function d(e){return function(t){for(var a=((t=t||window.event).target?t.target:t.srcElement).previousSibling;a&&a.name!=n;)a=a.previousSibling;return e?i({target:a,keyCode:13}):(a.value="",i({target:a,keyCode:8})),!1}}a(NaN,-1,-1)}function u(e,t,n){var r,i,d,u=(d=(r=n).match(/^([^\(]+)\(([^,]+),([^\)]+)\)$/))&&void 0!==(i=a[d[1]])?function(){return i.apply(this,[d[2],d[3]])}:(d=r.match(/^([^\(]+)\(([^,\)]+)\)$/))&&void 0!==(i=a[d[1]])?function(){return i.apply(this,[d[2]])}:a[r];if(u){var l=function(){if(e.form){e.className=e.className.replace(/ gluon-input-invalid/g,"");var n=e.options&&e.options.selectedIndex>-1?e.options[e.options.selectedIndex].value:e.value;0==n.length&&t||u.apply(n)||(e.className+=" gluon-input-invalid")}};o(e,"blur",l),o(e,"keyup",l),"select"==e.nodeName.toLowerCase()&&(o(e,"change",l),o(e,"click",l)),l()}}!function(){var t,n,a,r,l;t=document.querySelectorAll("[data-depends]");for(var s=0;void 0!==(g=t[s]);s++){var c=parseInt(g.getAttribute("data-index"),10),p=JSON.parse(g.getAttribute("data-depends"));if(!isNaN(c)&&p.length>0)for(var f=0;f<p.length;f++)n=g,a=p[f],r=c,l=void 0,(l=e[n.id])||(l={node:n,parent:n.parentNode.id,deps:[],index:r},e[n.id]=l),l.deps.push(a)}t=document.querySelectorAll("[data-update]");for(s=0;void 0!==(g=t[s]);s++)for(var v,h=g.getAttribute("data-update").split(" "),m=0;void 0!==(v=h[m]);m++)o(g,v,i);t=document.querySelectorAll("[data-type]");for(s=0;void 0!==(g=t[s]);s++)u(g,"true"===g.getAttribute("data-optional"),g.getAttribute("data-type"));t=document.querySelectorAll("[data-dynlist]");var g;for(s=0;void 0!==(g=t[s]);s++){d(g,JSON.parse(g.getAttribute("data-dynlist")))}i()}()}();
\ No newline at end of file
...@@ -10,12 +10,6 @@ msgstr "" ...@@ -10,12 +10,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "One or more fields contain invalid values!"
msgstr "Ein oder mehrere Felder enthalten ungültige Werte!"
msgid "One or more required fields have no value!"
msgstr "Ein oder mehr benötigte Felder sind nicht ausgefüllt!"
msgid "Reset" msgid "Reset"
msgstr "Zurücksetzen" msgstr "Zurücksetzen"
......
...@@ -10,12 +10,6 @@ msgstr "" ...@@ -10,12 +10,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "One or more fields contain invalid values!"
msgstr "Un ou plusieurs champs contiennent des valeurs incorrectes !"
msgid "One or more required fields have no value!"
msgstr "Un ou plusieurs champs n'ont pas de valeur !"
msgid "Reset" msgid "Reset"
msgstr "Remise à zéro" msgstr "Remise à zéro"
......