diff options
author | Jo-Philipp Wich <jo@mein.io> | 2017-01-26 00:21:17 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-01-26 00:21:19 +0100 |
commit | ca7555026765fed5fe2bf4aa2c65f8b21764b4b6 (patch) | |
tree | 66a725af3ab35a5b11f97341c27ec616d9afc106 /modules | |
parent | 1640d141913367827ab442276a943b0a3bba2e20 (diff) |
luci-mod-admin-full: admin: change password in Map.parse()
Move the password setting into the .parse() callback to ensure that it is
updated regardless of whether "Save" or "Save & Apply" has been pressed.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua index 1e475640b..493a735bd 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua @@ -21,7 +21,7 @@ function s.cfgsections() return { "_pass" } end -function m.on_commit(map) +function m.parse(map) local v1 = pw1:formvalue("_pass") local v2 = pw2:formvalue("_pass") @@ -36,6 +36,8 @@ function m.on_commit(map) m.message = translate("Given password confirmation did not match, password not changed!") end end + + Map.parse(map) end |