Lines 4-16
Link Here
|
4 |
<script type="text/JavaScript"> |
4 |
<script type="text/JavaScript"> |
5 |
//<![CDATA[ |
5 |
//<![CDATA[ |
6 |
$(document).ready(function() { |
6 |
$(document).ready(function() { |
|
|
7 |
var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces."); |
7 |
$("#changepasswordf").submit(function(){ |
8 |
$("#changepasswordf").submit(function(){ |
8 |
if($("input[name='newpassword']").val() != $("input[name='newpassword2']").val()){ |
9 |
if($("input[name='newpassword']").val() != $("input[name='newpassword2']").val()){ |
9 |
alert(_("Passwords do not match")); |
10 |
alert(_("Passwords do not match")); |
10 |
return false; |
11 |
return false; |
11 |
} else { |
12 |
} else { |
12 |
if ($("input[name='newpassword']").val().match(/^\s/) || $("input[name='newpassword']").val().match(/\s$/)) { |
13 |
if ( ! check_password( $("input[name='newpassword']").val() ) ) { |
13 |
alert(_("Password contains leading and/or trailing spaces.")); |
14 |
alert(MSG_PASSWORD_CONTAINS_TRAILING_SPACES); |
14 |
return false; |
15 |
return false; |
15 |
} else { |
16 |
} else { |
16 |
return true; |
17 |
return true; |