Extract js Method checkPasswordMatch
This commit is contained in:
parent
6b730d5b33
commit
9db0ea1870
@ -7,14 +7,18 @@
|
||||
{{template "head"}}
|
||||
|
||||
<script>
|
||||
function checkPasswordMatchUi() {
|
||||
if(checkPasswordMatch())
|
||||
$("#divCheckPasswordMatch").html("Passwords match.");
|
||||
else
|
||||
$("#divCheckPasswordMatch").html("Passwords do not match!");
|
||||
}
|
||||
|
||||
function checkPasswordMatch() {
|
||||
var password = $("#password").val();
|
||||
var confirmPassword = $("#password_confirm").val();
|
||||
|
||||
if (password != confirmPassword)
|
||||
$("#divCheckPasswordMatch").html("Passwords do not match!");
|
||||
else
|
||||
$("#divCheckPasswordMatch").html("Passwords match.");
|
||||
return password == confirmPassword;
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user