summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/account/ProfileView.js
blob: 342e831a610bdd5aba22fe2e13fcf6df3608be5f (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 = FormView.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){
  },

})