System Password: Prevent error when both password fields are empty
authorSteven Barth <steven@midlink.org>
Sun, 7 Dec 2008 13:26:34 +0000 (13:26 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 7 Dec 2008 13:26:34 +0000 (13:26 +0000)
modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua
modules/admin-mini/luasrc/model/cbi/mini/passwd.lua

index 8ff18cb5cf521e0f179e7efb8db07ac61f6af1b2..dff5aeb7b683adf087116eee3498afee92cc1746 100644 (file)
@@ -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
index 8ff18cb5cf521e0f179e7efb8db07ac61f6af1b2..dff5aeb7b683adf087116eee3498afee92cc1746 100644 (file)
@@ -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