System Password: Prevent error when both password fields are empty
This commit is contained in:
parent
506822ee70
commit
5960841098
2 changed files with 4 additions and 0 deletions
|
@ -16,9 +16,11 @@ f = SimpleForm("password", translate("a_s_changepw"), translate("a_s_changepw1")
|
||||||
|
|
||||||
pw1 = f:field(Value, "pw1", translate("password"))
|
pw1 = f:field(Value, "pw1", translate("password"))
|
||||||
pw1.password = true
|
pw1.password = true
|
||||||
|
pw1.rmempty = false
|
||||||
|
|
||||||
pw2 = f:field(Value, "pw2", translate("confirmation"))
|
pw2 = f:field(Value, "pw2", translate("confirmation"))
|
||||||
pw2.password = true
|
pw2.password = true
|
||||||
|
pw2.rmempty = false
|
||||||
|
|
||||||
function pw2.validate(self, value, section)
|
function pw2.validate(self, value, section)
|
||||||
return pw1:formvalue(section) == value and value
|
return pw1:formvalue(section) == value and value
|
||||||
|
|
|
@ -16,9 +16,11 @@ f = SimpleForm("password", translate("a_s_changepw"), translate("a_s_changepw1")
|
||||||
|
|
||||||
pw1 = f:field(Value, "pw1", translate("password"))
|
pw1 = f:field(Value, "pw1", translate("password"))
|
||||||
pw1.password = true
|
pw1.password = true
|
||||||
|
pw1.rmempty = false
|
||||||
|
|
||||||
pw2 = f:field(Value, "pw2", translate("confirmation"))
|
pw2 = f:field(Value, "pw2", translate("confirmation"))
|
||||||
pw2.password = true
|
pw2.password = true
|
||||||
|
pw2.rmempty = false
|
||||||
|
|
||||||
function pw2.validate(self, value, section)
|
function pw2.validate(self, value, section)
|
||||||
return pw1:formvalue(section) == value and value
|
return pw1:formvalue(section) == value and value
|
||||||
|
|
Loading…
Reference in a new issue