template: _.template( jQuery('#eventReg-registrant-add').html() ),
events: {
- //'click .add-new-registrant': 'addNew',
},
initialize: function(){
return this;
},
- addNew: function(){
- console.log( 'called addNew in newReg view' );
- var fname = this.$('.reg_fname').val().trim();
- var lname = this.$('.reg_lname').val().trim();
- var email = this.$('.reg_email').val().trim();
- console.log( 'email: ' + email + ' fname: ' + fname + ' lname: ' + lname );
-
- // Create a account
- // this.model.set({
- // fname: this.$('.reg_fname').val().trim(),
- // lname: this.$('.reg_lname').val().trim(),
- // email: this.$('.reg_email').val().trim(),
- // });
-
-
- // Destroy the model and view
- this.model.destroy();
- this.remove();
- },
-
render: function(){
this.$el.html( this.template( this.model.toJSON() ) );
return this;
template: _.template( jQuery('#eventReg-registrant-add').html() ),
events: {
- //'click .add-new-registrant': 'addNew',
},
initialize: function(){
return this;
},
- addNew: function(){
- console.log( 'called addNew in newReg view' );
- var fname = this.$('.reg_fname').val().trim();
- var lname = this.$('.reg_lname').val().trim();
- var email = this.$('.reg_email').val().trim();
- console.log( 'email: ' + email + ' fname: ' + fname + ' lname: ' + lname );
-
- // Create a account
- // this.model.set({
- // fname: this.$('.reg_fname').val().trim(),
- // lname: this.$('.reg_lname').val().trim(),
- // email: this.$('.reg_email').val().trim(),
- // });
-
-
- // Destroy the model and view
- this.model.destroy();
- this.remove();
- },
-
render: function(){
this.$el.html( this.template( this.model.toJSON() ) );
return this;