blob: 71c8792d30aeb4de301da6e5c7be02fc3361033e (
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
28
29
30
31
32
33
34
35
36
37
|
function ResetValidator(){
// modal window to allow users to reset their password //
this.setPassword = $('#set-password');
this.setPassword.modal({ show : false, keyboard : false, backdrop : 'static' });
this.setPasswordAlert = $('#set-password .alert');
}
ResetValidator.prototype.validatePassword = function(s)
{
if (s.length >= 6){
return true;
} else{
this.showAlert('Password Should Be At Least 6 Characters');
return false;
}
}
ResetValidator.prototype.showAlert = function(m)
{
this.setPasswordAlert.attr('class', 'alert alert-error');
this.setPasswordAlert.html(m);
this.setPasswordAlert.show();
}
ResetValidator.prototype.hideAlert = function()
{
this.setPasswordAlert.hide();
}
ResetValidator.prototype.showSuccess = function(m)
{
this.setPasswordAlert.attr('class', 'alert alert-success');
this.setPasswordAlert.html(m);
this.setPasswordAlert.fadeIn(500);
}
|