summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-12-07 13:44:25 +0000
committerSteven Barth <steven@midlink.org>2008-12-07 13:44:25 +0000
commit06514656f10187d3ee1c0b2b1be189a7f1df5394 (patch)
treed78c3cc3c0129f6e2737317c5e345b3674c11f08
parent1b41df2c29cb9acb959a145ee7c51436dbccef39 (diff)
System Password: Prevent error when both password fields are empty
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua2
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/passwd.lua2
2 files changed, 4 insertions, 0 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 8ff18cb5cf..dff5aeb7b6 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua
@@ -16,9 +16,11 @@ f = SimpleForm("password", translate("a_s_changepw"), translate("a_s_changepw1")
pw1 = f:field(Value, "pw1", translate("password"))
pw1.password = true
+pw1.rmempty = false
pw2 = f:field(Value, "pw2", translate("confirmation"))
pw2.password = true
+pw2.rmempty = false
function pw2.validate(self, value, section)
return pw1:formvalue(section) == value and value
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/passwd.lua b/modules/admin-mini/luasrc/model/cbi/mini/passwd.lua
index 8ff18cb5cf..dff5aeb7b6 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/passwd.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/passwd.lua
@@ -16,9 +16,11 @@ f = SimpleForm("password", translate("a_s_changepw"), translate("a_s_changepw1")
pw1 = f:field(Value, "pw1", translate("password"))
pw1.password = true
+pw1.rmempty = false
pw2 = f:field(Value, "pw2", translate("confirmation"))
pw2.password = true
+pw2.rmempty = false
function pw2.validate(self, value, section)
return pw1:formvalue(section) == value and value