From aae5efea3aec105ad8e8419656241345f34d7f19 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 20 Dec 2017 11:40:18 -0500 Subject: [PATCH] Update for saving custom fields when updating attendees. Adding , {wait: true} to the model.save call for the saving of the registrant data. This makes backbone wait until the server responds to render the view again. Updating style for cancel to be buttons with spacing. --- css/front.css | 33 +++++++++++---------- js/frontRegApp.js | 6 ++-- js/views/front/regRequestRegistrant.js | 6 ++-- views/front/registrations/registration.html | 4 +-- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/css/front.css b/css/front.css index 87bc0dd..3a60d05 100644 --- a/css/front.css +++ b/css/front.css @@ -138,10 +138,10 @@ } .glm-reg-event-profile-details-container{ padding: 0 0 0 50px; - + } .glm-reg-class-container{ - + } .glm-reg-row { clear: both; @@ -175,7 +175,7 @@ height: auto; float: left; } -.glm-reg-header-row.glm-cart-summary-event-name-row a { +.glm-reg-header-row.glm-cart-summary-event-name-row a { color: white; } .glm-reg-header-row .glm-cart-summary-event-name { @@ -386,7 +386,7 @@ body .glm-reg-proceed-to-checkout{ font-size: 16px !important; } .reg-class-detail { - display: none; + display: none; padding: 5px 10px; } .toggle-class-open { @@ -410,7 +410,7 @@ body .glm-reg-proceed-to-checkout{ /* -moz-column-count: 2; column-count: 2; -webkit-column-count: 2;*/ - + } /*}}} End Event Registration Page */ @@ -584,7 +584,7 @@ span.glm-error { /* Reg detail styles */ #regApp { - + } #regApp .reg-edit-form { float: left; @@ -617,9 +617,10 @@ span.glm-error { float: left; margin-bottom: 0; } -#regApp .reg-edit-form .update-registrant-button-container .update-registrant.cancel { +#regApp .reg-edit-form .update-registrant-button-container .update-registrant-cancel { float: right; padding: 10px; + margin-left: 10px; } #accountHeader .glm-reg-header-btn{ font-size: 16px; @@ -806,7 +807,7 @@ span.glm-error { .glm-reg-image-container { text-align: left; } - + #accountHeader #glm-header-reg-widget { width: 100%; } @@ -823,7 +824,7 @@ span.glm-error { .glm-reg-classes { /* padding: 0;*/ } - + #glm-reg-event-name { padding: 0; line-height: 1.2; @@ -843,23 +844,23 @@ span.glm-error { float: left; width: 450px; } - + .reg-class-time { padding: 5px 5px 15px; width: 100%; float: left; - + /* -moz-column-count: 2; column-count: 2; -webkit-column-count: 2;*/ - + } - + } /* PROGRESS BAR */ .progress-container { /* width: 600px;*/ - margin: 35px auto; + margin: 35px auto; } .progressbar { counter-reset: step; @@ -914,7 +915,7 @@ span.glm-error { /* Cart Styles */ #glm-cart-checkout-button { - + } .button.glm-reg-button { font-size: 16px; @@ -956,7 +957,7 @@ span.glm-error { background-color: white; height: 30px; overflow: hidden; - + } .glm-reg-progress-bar-section { height: 30px; diff --git a/js/frontRegApp.js b/js/frontRegApp.js index 1fcfd05..2eea7df 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -801,7 +801,7 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ // Validate the model // Have to require reg_time if app.timeSpecific is true // Get the form values and update the model. - this.model.set({ + this.model.save({ option: 'update', id: this.model.get('id'), reg_request: this.model.get('reg_request'), @@ -817,8 +817,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ country: country, reg_time: this.model.get('reg_time'), customFields: customFieldData, - }); - this.model.save(); + }, {wait: true}); + // this.model.save(); if ( this.model.validationError ) { // console.log( this.model.validationError ); } diff --git a/js/views/front/regRequestRegistrant.js b/js/views/front/regRequestRegistrant.js index 96d0399..3a4f1e6 100644 --- a/js/views/front/regRequestRegistrant.js +++ b/js/views/front/regRequestRegistrant.js @@ -55,7 +55,7 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ // Validate the model // Have to require reg_time if app.timeSpecific is true // Get the form values and update the model. - this.model.set({ + this.model.save({ option: 'update', id: this.model.get('id'), reg_request: this.model.get('reg_request'), @@ -71,8 +71,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ country: country, reg_time: this.model.get('reg_time'), customFields: customFieldData, - }); - this.model.save(); + }, {wait: true}); + // this.model.save(); if ( this.model.validationError ) { // console.log( this.model.validationError ); } diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index 16ae872..f939813 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -219,7 +219,7 @@
- Cancel + Cancel
{/literal} @@ -287,7 +287,7 @@ {/if}{literal}
- Cancel + Cancel
<% } %> -- 2.17.1