blob: 892ccbec5fcf1c69dd0cc5fe00e33b8bae5ca661 (
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
27
28
29
30
31
32
33
34
|
var ProfileView = View.extend({
el: "#profile",
events: {
},
initialize: function(){
this.$form = this.$("form")
this.$msg = this.$(".msg")
},
show: function(){
app.footer.show("SAVE", "CANCEL")
document.body.className = "profile"
},
validate_presence: {
"Name": "Please enter your first name.",
"Surname": "Please enter your last name.",
"Email": "Please enter a valid email address.",
},
validate_fields: function(errors){
if (data.Password && ! data.Password2) { errors.push("Password2", "Please enter your new password.") }
},
success: function(data){
},
error: function(data){
},
})
|