From: Steve Sutton Date: Mon, 13 Nov 2017 18:25:22 +0000 (-0500) Subject: Update views on front end X-Git-Tag: v1.0.0^2~285 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=29d255312975030bed7f60f4fcda1ad17bc07ca4;p=WP-Plugins%2Fglm-member-db-registrations.git Update views on front end Add collapse for the address part of the add edit registrant. Add Registrant credits to the regClass part. --- diff --git a/css/front.css b/css/front.css index 565a106..6043a8c 100644 --- a/css/front.css +++ b/css/front.css @@ -165,6 +165,9 @@ label.registrant-label { label.reg-time { display: inline; } +.ereg-addr { + display: none; +} /*}}} End New Attendee Form */ /*{{{ Login Page */ diff --git a/js/frontRegApp.js b/js/frontRegApp.js index afc01a3..0acb594 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -493,6 +493,11 @@ app.Views.Front.RegClass = Backbone.View.extend({ // 'click .add-new-registrant-cancel': 'cancelAddNew', // 'click .timeSelection': 'updateTimeSelection', 'click .fc-event-container': 'updateTimeSelection', + 'click .show-hide-address': 'toggleClass', + }, + + toggleClass: function(){ + this.$('.ereg-addr').toggle(); }, updateTimeSelection: function(e){ diff --git a/js/models/front/regClass.js b/js/models/front/regClass.js index d7e0700..8574212 100644 --- a/js/models/front/regClass.js +++ b/js/models/front/regClass.js @@ -13,6 +13,7 @@ app.Models.Front.RegClass = Backbone.Model.extend({ reg_rate_name: '', reg_rate_base_price: '', reg_rate_per_reg: '', + registrant_credits: '', reg_count: 0, loggedIn: false, selectedTime: 0, diff --git a/js/views/front/regClass.js b/js/views/front/regClass.js index 96990cc..c617384 100644 --- a/js/views/front/regClass.js +++ b/js/views/front/regClass.js @@ -26,6 +26,11 @@ app.Views.Front.RegClass = Backbone.View.extend({ // 'click .add-new-registrant-cancel': 'cancelAddNew', // 'click .timeSelection': 'updateTimeSelection', 'click .fc-event-container': 'updateTimeSelection', + 'click .show-hide-address': 'toggleClass', + }, + + toggleClass: function(){ + this.$('.ereg-addr').toggle(); }, updateTimeSelection: function(e){ diff --git a/models/front/registrations/registration.php b/models/front/registrations/registration.php index eb7497d..4e33ac4 100644 --- a/models/front/registrations/registration.php +++ b/models/front/registrations/registration.php @@ -203,6 +203,7 @@ $rClass['reg_rate_name'] = $time['name']; $rClass['reg_rate_base_price'] = $time['base_rate']; $rClass['reg_rate_per_reg'] = $time['per_registrant']; + $rClass['registrant_credits'] = $time['registrant_credits']; if ( $regEvent['time_specific'] ) { $rClass['selectedTime'] = $time['id']; } diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index 17f7ad5..3c9b562 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -60,6 +60,7 @@
<%= reg_rate_name %>
Base Rate: $<%= reg_rate_base_price %>
Per Registrant: $<%= reg_rate_per_reg %>
+
Registrant Credits: <%= registrant_credits %>
<% if ( app.timeSpecific ) { %> @@ -115,26 +116,29 @@
+ Address (show/hide) +
+
Address 1
-
+
Address 2
-
+
City
-
+
State
-
+
Zip/Postal Code
-
+
Country
@@ -158,36 +162,49 @@ <% } else { %>
<%= fname %> <%= lname %> <%= email %>
- {/literal}{if $regEvent.time_specific.value} - {/if}{literal} - {/literal}{if $regEvent.time_specific.value} -
- {else} -
- {/if}{literal} -
- {/literal}{$terms.reg_term_contact_information}{literal} -
-
- - -
-
- disabled <% } %>> - (Email is optional) -
-
- - -
-
- - -
-
- - -
+ {/literal}{literal} +
+

{/literal}{$terms.reg_term_contact_information}{literal}

+
+
First Name
+
+
+
+
Last Name
+
+
+
+
Email Address
+
+
+ +
+
Address 1
+
+
+
+
Address 2
+
+
+
+
City
+
+
+
+
State
+
+
+
+
Zip/Postal Code
+
+
+
+
Country
+
+
+
{/literal}{if $regEvent.time_specific.value}