Use terms in the registration page when possible.
// to the collection.
var customFieldData = this.$( 'form.attendee-cf-form-new' ).serialize();
- // return false;
+ // var newRegistrant = new app.Models.Front.RegRequestRegistrant({
+ // option: 'add',
+ // reg_request: regRequest.id,
+ // reg_time: this.model.get( 'id' ),
+ // reg_event: this.model.get( 'reg_event' ), // Todo: use correct reg_event
+ // reg_class: this.model.get( 'parent' ).id, // Todo: use correct reg_class
+ // reg_rate: rateId,
+ // email: email,
+ // fname: fname,
+ // lname: lname,
+ // addr1: addr1,
+ // addr2: addr2,
+ // city: city,
+ // state: state,
+ // zip: zip,
+ // country: country,
+ // customFields: customFieldData
+ // } );
+ // newRegistrant.save({error: function( model, response, options ){
+ // console.log( 'Error run for adding model' );
+ // console.log( response );
+ // }});
+ // this.model.collection.add( newRegistrant );
var newRegistrant = this.model.registrants.create({
option: 'add',
reg_request: regRequest.id,
zip: zip,
country: country,
customFields: customFieldData,
- },{wait: true});
+ },{ wait: true, error: this.errorCallback });
this.$('.glm-add-new-account').show();
this.newRegAccount.destroy();
app.regEventLock = false;
},
+ errorCallback: function( collection, response ){
+ console.log( 'errorCallback Called' );
+ console.log( response );
+ },
+
// cancel add new registrant
cancelAddNew: function(){
this.$('.glm-add-new-account').show();
// to the collection.
var customFieldData = this.$( 'form.attendee-cf-form-new' ).serialize();
- // return false;
+ // var newRegistrant = new app.Models.Front.RegRequestRegistrant({
+ // option: 'add',
+ // reg_request: regRequest.id,
+ // reg_time: this.model.get( 'id' ),
+ // reg_event: this.model.get( 'reg_event' ), // Todo: use correct reg_event
+ // reg_class: this.model.get( 'parent' ).id, // Todo: use correct reg_class
+ // reg_rate: rateId,
+ // email: email,
+ // fname: fname,
+ // lname: lname,
+ // addr1: addr1,
+ // addr2: addr2,
+ // city: city,
+ // state: state,
+ // zip: zip,
+ // country: country,
+ // customFields: customFieldData
+ // } );
+ // newRegistrant.save({error: function( model, response, options ){
+ // console.log( 'Error run for adding model' );
+ // console.log( response );
+ // }});
+ // this.model.collection.add( newRegistrant );
var newRegistrant = this.model.registrants.create({
option: 'add',
reg_request: regRequest.id,
zip: zip,
country: country,
customFields: customFieldData,
- },{wait: true});
+ },{ wait: true, error: this.errorCallback });
this.$('.glm-add-new-account').show();
this.newRegAccount.destroy();
app.regEventLock = false;
},
+ errorCallback: function( collection, response ){
+ console.log( 'errorCallback Called' );
+ console.log( response );
+ },
+
// cancel add new registrant
cancelAddNew: function(){
this.$('.glm-add-new-account').show();
switch ( $option ) {
case 'add':
-
+ // wp_die( 'Error', 'Error', array( 'response' => 401 ) );
// Call to add registrant
$registrant = $this->addUpdateRegistrantToCart( $modelData, 'add' );
$registrant['name'] = $registrant['fname'] . ' ' . $registrant['lname'];
);
// echo "<pre>".print_r($templateData,1)."</pre>";
-
+
// Return status, any suggested view, and any data to controller
return array(
'status' => true,
<div id="accountHeader" class="glm-row">
<div id="accountHeader-left" class="accountHeader-section small-12 medium-12 medium-centered large-4 large-uncentered columns">
- <a id="accountHeader-list-link"href="{$regUrl}" class="button glm-reg-header-btn">
+ <a id="accountHeader-list-link" href="{$regUrl}" class="button glm-reg-header-btn">
<span>Event Registration List</span>
</a>
<% } %>
<button class="glm-add-new-account">Add New {/literal}{$terms.reg_term_attendee_cap}{literal}</button>
<div class="reg-class-accounts">
- <span class="reg-class-accounts-title">List of attendees</span>
+ <span class="reg-class-accounts-title">List of {/literal}{$terms.reg_term_attendee_plur}{literal}</span>
</div>
</script>
{/literal}
<div class="row progress-row">
<div class="progress-container columns">
<ul class="progressbar">
- <li class="active">Register</li>
+ <li class="active">{$terms.reg_term_register_cap}</li>
<li >View Cart</li>
<li>Checkout</li>
</ul>