summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/model/cbi/admin_system
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-14 19:19:05 +0000
committerSteven Barth <steven@midlink.org>2008-08-14 19:19:05 +0000
commit1616d5a81ef58270911b0f3f350f1ef838896b23 (patch)
treebd71dff1c6f4e2df966b2a050f070dd9761f0a7a /modules/admin-full/luasrc/model/cbi/admin_system
parent15e2e16c6d81633d0dede30e7411e6b224998029 (diff)
Enable more sanity checks for Password Changing page
Diffstat (limited to 'modules/admin-full/luasrc/model/cbi/admin_system')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua b/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua
index 7e766d5eb..8ff18cb5c 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua
@@ -27,16 +27,15 @@ end
function f.handle(self, state, data)
if state == FORM_VALID then
local stat = luci.sys.user.setpasswd("root", data.pw1) == 0
- local x = f:field(DummyValue, "_stat")
if stat then
- x.value = translate("a_s_changepw_changed")
+ f.message = translate("a_s_changepw_changed")
else
- x.value = translate("unknownerror")
+ f.errmessage = translate("unknownerror")
end
- pw1.render = function() end
- pw2.render = pw1.render
+ data.pw1 = nil
+ data.pw2 = nil
end
return true
end