blob: 6ac23c081347e9d59cd106983c3ad0abb33fef02 (
plain)
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
|
var PasswordForgot = ModalFormView.extend({
el: ".mediaDrawer.passwordForgot",
action: "/auth/passwordForgot",
validate: function(){
var errors = []
var email = this.$("#emailInput").val()
if (! email.length) {
errors.push("Please enter your email address");
}
if (email.indexOf("@") === -1) {
errors.push("Sorry, that is not a valid email address");
}
return errors
},
success: function(res){
AlertModal.alert("Check your email, you should receive further instructions momentarily.", function(e){
window.location.href = "/"
})
},
})
|