blob: c6a616684636ad4e36ec5cee86693f1571b43866 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$(document).ready(function(){
var rv = new ResetValidator();
$('#set-password-form').ajaxForm({
beforeSubmit : function(formData, jqForm, options){;
rv.hideAlert();
if (rv.validatePassword($('#pass-tf').val()) == false){
return false;
} else{
return true;
}
},
success : function(responseText, status, xhr, $form){
rv.showSuccess("Your password has been reset.");
setTimeout(function(){ window.location.href = '/'; }, 3000);
},
error : function(){
rv.showAlert("I'm sorry something went wrong, please try again.");
}
});
$('#set-password').modal('show');
$('#set-password').on('shown', function(){ $('#pass-tf').focus(); })
});
|