state: '',
zip: '',
country: '',
+ customFields: '',
},
// url used for ajax request
// used to setup initial class
initialize: function(){
- this.listenTo( this.model, 'change', this.render );
-
- // Call the custom fields ajax
- // if ( this.model.id ) {
- // this.customFieldFormData = app.setCustomFieldsForm(
- // this.model.get('reg_event'),
- // this.model.id,
- // 'return'
- // );
- // }
+ // this.listenTo( this.model, 'change', this.render );
+ this.listenTo( this.model, 'change:customFields', this.resetCustomFields );
return this;
},
// Get the form values and update the model.
this.model.set({
option: 'update',
+ id: this.model.get('id'),
reg_request: this.model.get('reg_request'),
reg_event: this.model.get('reg_event'),
reg_class: this.model.get('reg_class'),
// console.log( this.model.validationError );
}
- this.$('.reg-edit-form').hide();
+ // this.$('.reg-edit-form').hide();
app.regEventLock = false;
},
+ resetCustomFields: function() {
+ // Call the custom fields ajax
+ app.setCustomFieldsForm(this.model.get('reg_event'), this.model.id, '.attendee-cf-' + this.model.id);
+ this.$('.reg-edit-form').hide();
+ },
+
toggleClass: function(){
this.$('.ereg-addr').toggle();
},
// render the view
render: function(){
- // Call the custom fields ajax
- app.setCustomFieldsForm(this.model.get('reg_event'), this.model.id, '.attendee-cf-' + this.model.id);
+ // console.log( 'regReguestRegistrantView.render called' );
this.$el.html( this.template( this.model.toJSON() ) );
this.$emailInput = this.$('.editEmail');
this.$('.reg-edit-form').hide();
+
+ // Call the custom fields ajax
+ app.setCustomFieldsForm(this.model.get('reg_event'), this.model.id, '.attendee-cf-' + this.model.id);
+ // console.log('call setCustomFieldsForm' );
// if ( this.customFieldFormData ) {
// this.$('.attendee-cf-' + this.model.get('id')).html( this.customFieldFormData );
// }
// used to setup initial class
initialize: function(){
- this.listenTo( this.model, 'change', this.render );
-
- // Call the custom fields ajax
- // if ( this.model.id ) {
- // this.customFieldFormData = app.setCustomFieldsForm(
- // this.model.get('reg_event'),
- // this.model.id,
- // 'return'
- // );
- // }
+ // this.listenTo( this.model, 'change', this.render );
+ this.listenTo( this.model, 'change:customFields', this.resetCustomFields );
return this;
},
// Get the form values and update the model.
this.model.set({
option: 'update',
+ id: this.model.get('id'),
reg_request: this.model.get('reg_request'),
reg_event: this.model.get('reg_event'),
reg_class: this.model.get('reg_class'),
// console.log( this.model.validationError );
}
- this.$('.reg-edit-form').hide();
+ // this.$('.reg-edit-form').hide();
app.regEventLock = false;
},
+ resetCustomFields: function() {
+ // Call the custom fields ajax
+ app.setCustomFieldsForm(this.model.get('reg_event'), this.model.id, '.attendee-cf-' + this.model.id);
+ this.$('.reg-edit-form').hide();
+ },
+
toggleClass: function(){
this.$('.ereg-addr').toggle();
},
// render the view
render: function(){
- // Call the custom fields ajax
- app.setCustomFieldsForm(this.model.get('reg_event'), this.model.id, '.attendee-cf-' + this.model.id);
+ // console.log( 'regReguestRegistrantView.render called' );
this.$el.html( this.template( this.model.toJSON() ) );
this.$emailInput = this.$('.editEmail');
this.$('.reg-edit-form').hide();
+
+ // Call the custom fields ajax
+ app.setCustomFieldsForm(this.model.get('reg_event'), this.model.id, '.attendee-cf-' + this.model.id);
+ // console.log('call setCustomFieldsForm' );
// if ( this.customFieldFormData ) {
// this.$('.attendee-cf-' + this.model.get('id')).html( this.customFieldFormData );
// }