From 15e2e16c6d81633d0dede30e7411e6b224998029 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 14 Aug 2008 19:01:36 +0000 Subject: [PATCH] Converted password change form to CBI model --- i18n/english/luasrc/i18n/default.en.lua | 1 + i18n/german/luasrc/i18n/default.de.lua | 1 + libs/cbi/luasrc/cbi.lua | 2 +- libs/cbi/luasrc/view/cbi/value.htm | 2 +- .../admin-full/luasrc/controller/admin/system.lua | 2 +- .../luasrc/model/cbi/admin_system/passwd.lua | 44 +++++++++++++++++++ .../admin-full/luasrc/view/admin_system/passwd.htm | 49 ---------------------- 7 files changed, 49 insertions(+), 52 deletions(-) create mode 100644 modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua delete mode 100644 modules/admin-full/luasrc/view/admin_system/passwd.htm diff --git a/i18n/english/luasrc/i18n/default.en.lua b/i18n/english/luasrc/i18n/default.en.lua index ac532743b..81c5c25ea 100644 --- a/i18n/english/luasrc/i18n/default.en.lua +++ b/i18n/english/luasrc/i18n/default.en.lua @@ -92,6 +92,7 @@ services = "Services" settings = "Settings" start = "Start" static = "static" +status = "Status" statistics = "Statistics" submit = "Submit" syslog = "System Log" diff --git a/i18n/german/luasrc/i18n/default.de.lua b/i18n/german/luasrc/i18n/default.de.lua index a9c68cfbb..339f2e96b 100644 --- a/i18n/german/luasrc/i18n/default.de.lua +++ b/i18n/german/luasrc/i18n/default.de.lua @@ -94,6 +94,7 @@ settings = "Einstellungen" start = "Start" static = "statisch" statistics = "Statistiken" +status = "Status" submit = "Absenden" syslog = "Systemprotokoll" system = "System" diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 8816b11b7..3b5a7c1b7 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -653,7 +653,7 @@ function AbstractValue.parse(self, section) local cvalue = self:cfgvalue(section) if fvalue and fvalue ~= "" then -- If we have a form value, write it to UCI - fvalue = self:transform(self:validate(fvalue)) + fvalue = self:transform(self:validate(fvalue, section)) if not fvalue then self.tag_invalid[section] = true end diff --git a/libs/cbi/luasrc/view/cbi/value.htm b/libs/cbi/luasrc/view/cbi/value.htm index 777d48093..51c78549c 100644 --- a/libs/cbi/luasrc/view/cbi/value.htm +++ b/libs/cbi/luasrc/view/cbi/value.htm @@ -13,7 +13,7 @@ $Id$ -%> <%+cbi/valueheader%> - /> + " onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section)) .. ifattr(self.size, "size") .. ifattr(self.maxlength, "maxlength") %> /> <% if #self.keylist > 0 then -%>