summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full
diff options
context:
space:
mode:
Diffstat (limited to 'modules/admin-full')
-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 7e766d5ebd..8ff18cb5cf 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