From 7a844c07e31bbd9fb2509c5e55f5b6107201f52d Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 3 Nov 2017 16:58:55 -0400 Subject: [PATCH] Add model/collection/view for regTime WIP Working on moving some stuff from regClass into the regTime view. Will need to fix the creation of registrants and make sure the data it is sending back to ajax calls is correct. --- css/front.css | 4 + js/collections/front/regTimes.js | 8 + js/frontRegApp.js | 232 ++++++++++++++++++-- js/models/front/regClass.js | 7 +- js/models/front/regEvent.js | 1 + js/models/front/regTime.js | 26 +++ js/views/front/regClass.js | 62 ++++-- js/views/front/regTime.js | 125 +++++++++++ models/front/registrations/registration.php | 9 +- package.json | 1 + views/front/registrations/registration.html | 29 ++- 11 files changed, 450 insertions(+), 54 deletions(-) create mode 100644 js/collections/front/regTimes.js create mode 100644 js/models/front/regTime.js create mode 100644 js/views/front/regTime.js diff --git a/css/front.css b/css/front.css index ef8e0ff..565a106 100644 --- a/css/front.css +++ b/css/front.css @@ -230,6 +230,10 @@ span.glm-error { /*}}} End Errors */ +.glm-add-new-account { + font-size: 1rem; +} + #glm-reg-widget { display: inline-block; } diff --git a/js/collections/front/regTimes.js b/js/collections/front/regTimes.js new file mode 100644 index 0000000..3ef9dab --- /dev/null +++ b/js/collections/front/regTimes.js @@ -0,0 +1,8 @@ +// js/collections/regTimes.js + +// reg time collection +app.Collections.Front.RegTimes = Backbone.Collection.extend({ + model: app.Models.Front.RegTime, + + url: ajaxUrl+'&glm_action=regFront&collection=regTime=', +}); diff --git a/js/frontRegApp.js b/js/frontRegApp.js index a981ee9..6402e9f 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -105,11 +105,12 @@ app.Models.Front.RegClass = Backbone.Model.extend({ initialize: function(){ this.registrants = new app.Collections.Front.RegRequestRegistrants( [] ); + this.regTimes = new app.Collections.Front.RegTimes( [] ); }, - setRegistrants: function( registrants ) { - this.registrants.reset( registrants ); - }, + // setRegistrants: function( registrants ) { + // this.registrants.reset( registrants ); + // }, // Check to see if the current login user in the list of registrants hasMe: function() { @@ -159,6 +160,7 @@ app.Models.Front.RegEvent = Backbone.Model.extend({ setClassRegistrants: function( registrants ){ for ( var i = 0; i < registrants.length; i++ ) { var foundClass = this.classes.findWhere({ id: registrants[i].class_id }); + console.log( foundClass ); if ( foundClass != undefined ) { foundClass.registrants.create( registrants[i] ); var newReg = foundClass.registrants.pop(); @@ -241,6 +243,33 @@ app.Models.Front.RegRequestRegistrant = Backbone.Model.extend({ }); +// js/models/front/regTime.js +// Event Reg Time Model +app.Models.Front.RegTime = Backbone.Model.extend({ + + // Default regTime values + defaults: { + id: 0, + reg_event: 0, + event_time: 0, + start_datetime: '', + end_datetime: '', + all_day: false, + attendees: false, + attendee_max: 0, + attendee_count: 0, + attendees_pending: 0, + attendees_available: 0, + descr: '', + parent: null, + }, + + initialize: function(){ + // Initial setting for model + this.registrants = new app.Collections.Front.RegRequestRegistrants( [] ); + }, +}); + app.Models.Front.Request = Backbone.Model.extend({ defaults: { name: 'request', @@ -339,6 +368,15 @@ app.Collections.Front.RegRequestRegistrants = Backbone.Collection.extend({ }); +// js/collections/regTimes.js + +// reg time collection +app.Collections.Front.RegTimes = Backbone.Collection.extend({ + model: app.Models.Front.RegTime, + + url: ajaxUrl+'&glm_action=regFront&collection=regTime=', +}); + // js/views/account.js // Event Registrant View @@ -414,38 +452,56 @@ app.Views.Front.RegClass = Backbone.View.extend({ this.listenTo( this.model.registrants, 'create', this.addOne ); this.listenTo( this.model.registrants, 'remove', this.deleteOne ); this.listenTo( this.model, 'change', this.render ); + this.listenTo( this.model.regTimes, 'add', this.render ); return this; }, events: { 'click .addRegistrant': 'newEntry', - 'click .glm-add-account': 'addAccount', - 'click .glm-add-new-account': 'addNewAccount', - 'click .add-new-registrant': 'addNew', - 'click .add-new-registrant-cancel': 'cancelAddNew', + // 'click .glm-add-account': 'addAccount', + // 'click .glm-add-new-account': 'addNewAccount', + // 'click .add-new-registrant': 'addNew', + // 'click .add-new-registrant-cancel': 'cancelAddNew', 'click .timeSelection': 'updateTimeSelection', }, - updateTimeSelection: function(){ - // Need to remove the newRegModal and views - if ( this.newRegAccount ) { - this.newRegAccount.destroy(); - this.newRegAccountView.remove(); + updateTimeSelection: function(e){ + // console.log(e); + // if ( this.newRegAccount ) { + // this.newRegAccount.destroy(); + // this.newRegAccountView.remove(); + // } + // Check to see if the time is already in the collection + // If it is then do nothing + var findRegTime = this.model.regTimes.get( e.currentTarget.value ); + if ( !findRegTime ) { + this.model.set({ selectedTime: parseInt( e.currentTarget.value ) }); + // Add the RegTime model/view into this view + var foundRegTime = app.times.get( e.currentTarget.value ); + foundRegTime.set({parent: this.model}); + this.model.regTimes.create( foundRegTime ); } - this.model.set({ selectedTime: parseInt( this.$('.timeSelection:checked').val() ) }); - console.log( this.$('.timeSelection:checked').val()); }, render: function(){ this.model.set({ reg_count: this.model.registrants.length }); this.$el.html( this.template( this.model.toJSON() ) ); - // Need to see if this class has attendees and render them - var view = this.model.registrants.map(function(item){ - return (new app.Views.Front.RegRequestRegistrant({ model: item })).render().el; + // Go through the RegTimes Collection and render those + // var view = this.model. + var view = this.model.regTimes.map(function(item){ + return (new app.Views.Front.RegTime({ model: item })).render().el; }); - var accountContainer = this.$('.reg-class-accounts'); - accountContainer.append(view); + var timeContainer = this.$('.reg-class-times'); + timeContainer.append( view ); + + // Need to see if this class has attendees and render them + // var view = this.model.registrants.map(function(item){ + // return (new app.Views.Front.RegRequestRegistrant({ model: item })).render().el; + // }); + // var accountContainer = this.$('.reg-class-accounts'); + // accountContainer.append(view); + if ( app.timeSpecific ) { // Need to require that the user select the time before entering attendees. } @@ -472,8 +528,14 @@ app.Views.Front.RegClass = Backbone.View.extend({ var times = this.model.get( 'times' ); var timeParts = []; _.each( times, function(time){ - var testDate = new Date( time.start_datetime.datetime ); - timeParts.push( {id: time.id,date: testDate, name: time.name} ); + var fDate = new Date( time.start_datetime.datetime ); + var tDate = new Date( time.end_datetime.datetime ); + timeParts.push( { + id: time.id, + fromDate: fDate, + toDate: tDate, + name: time.name + } ); }); // console.log( timeParts ); return timeParts; @@ -618,6 +680,7 @@ app.Views.Front.RegClass = Backbone.View.extend({ }, cancelAddNew: function(){ + this.$('.glm-add-new-account').show(); // this.newRegAccount.destroy(); this.newRegAccountView.remove(); // app.calendar = false; @@ -631,6 +694,7 @@ app.Views.Front.RegClass = Backbone.View.extend({ }, addNewAccount: function(){ + this.$('.glm-add-new-account').hide(); // Create the new Registrant View if ( app.timeSpecific ) { this.newRegAccount = new app.Models.Front.RegRequestRegistrant({ reg_time: this.model.get( 'selectedTime' ) }); @@ -877,6 +941,132 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ }); +// js/views/regClass.js +var newId = 0; +app.Views.Front.RegTime = Backbone.View.extend({ + tagName: 'div', + + className: 'glm-row', + + template: _.template( jQuery('#regTime-template').html() ), + + initialize: function(){ + return this; + }, + + events: { + 'click .glm-add-new-account': 'addNewAccount', + 'click .add-new-registrant': 'insertNew', + 'click .add-new-registrant-cancel': 'cancelAddNew', + }, + + render: function(){ + this.model.set({ reg_count: this.model.registrants.length }); + this.$el.html( this.template( this.model.toJSON() ) ); + // Need to see if this has attendees and render them + var view = this.model.registrants.map(function(item){ + return (new app.Views.Front.RegRequestRegistrant({ model: item })).render().el; + }); + var accountContainer = this.$('.reg-class-accounts'); + accountContainer.append(view); + return this; + }, + + addNewAccount: function(){ + this.$('.glm-add-new-account').hide(); + // Create the new Registrant View + if ( app.timeSpecific ) { + this.newRegAccount = new app.Models.Front.RegRequestRegistrant({ reg_time: this.model.get( 'selectedTime' ) }); + } else { + this.newRegAccount = new app.Models.Front.RegRequestRegistrant(); + } + this.newRegAccountView = new app.Views.Front.RegistrantForm({model: this.newRegAccount}); + this.$el.append( this.newRegAccountView.render().el ); + }, + + insertNew: function(){ + var findByEmail = []; + var fname = this.$('.add_reg_fname').val().trim(); + var lname = this.$('.add_reg_lname').val().trim(); + var email = this.$('.add_reg_email').val().trim(); + var addr1 = this.$('.add_reg_addr1').val().trim(); + var addr2 = this.$('.add_reg_addr2').val().trim(); + var city = this.$('.add_reg_city').val().trim(); + var state = this.$('.add_reg_state').val().trim(); + var zip = this.$('.add_reg_zip').val().trim(); + var country = this.$('.add_reg_country').val().trim(); + var sTime = this.model.get( 'selectedTime' ); + if ( this.$('#add_reg-select-time').length ) { + var times = this.model.get( 'times' ); + var rateId = null; + // Setup the needed reg_rate + _.each( times, function( time ){ + if ( time.id == sTime ) { + rateId = time.rate_id; + } + } ); + } else { + var times = this.model.get( 'times' ); + var rateId = null; + _.each( times, function( time ){ + rateId = time.rate_id; + } ); + } + if ( fname === '' || lname === '' ) { + alert( 'First and Last name required!' ); + return; + } + if ( email === '' ) { + var confAnsw = confirm( 'You have no email address! Are you sure you want to add this registrant?' ); + if ( !confAnsw ) { + return; + } + } else { + findByEmail = this.model.registrants.where({email: email}); + } + var regRequest = cart.get( 'request' ); + if ( findByEmail.length === 0 ) { + this.model.registrants.create({ + 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( 'id' ), // Todo: use correct reg_class + event_name: regEvent.get( 'event_name' ), + reg_rate: rateId, + email: email, + fname: fname, + lname: lname, + addr1: addr1, + addr2: addr2, + city: city, + state: state, + zip: zip, + country: country, + }); + } + // this.newRegAccount.destroy(); + this.newRegAccountView.remove(); + // app.calendar = false; + }, + + cancelAddNew: function(){ + this.$('.glm-add-new-account').show(); + // this.newRegAccount.destroy(); + this.newRegAccountView.remove(); + // app.calendar = false; + if ( loginAccount != '' && this.model.hasMe() ) { + this.$('.glm-add-account').hide(); + // console.log('hiding'); + } else if ( loginAccount != '' ) { + this.$('.glm-add-account').show(); + // console.log('showing'); + } + }, + + +}); + app.Views.Front.RegistrantForm = Backbone.View.extend({ tagName: 'div', diff --git a/js/models/front/regClass.js b/js/models/front/regClass.js index fae84e5..2ef5cc2 100644 --- a/js/models/front/regClass.js +++ b/js/models/front/regClass.js @@ -20,11 +20,12 @@ app.Models.Front.RegClass = Backbone.Model.extend({ initialize: function(){ this.registrants = new app.Collections.Front.RegRequestRegistrants( [] ); + this.regTimes = new app.Collections.Front.RegTimes( [] ); }, - setRegistrants: function( registrants ) { - this.registrants.reset( registrants ); - }, + // setRegistrants: function( registrants ) { + // this.registrants.reset( registrants ); + // }, // Check to see if the current login user in the list of registrants hasMe: function() { diff --git a/js/models/front/regEvent.js b/js/models/front/regEvent.js index b39f216..2d70233 100644 --- a/js/models/front/regEvent.js +++ b/js/models/front/regEvent.js @@ -29,6 +29,7 @@ app.Models.Front.RegEvent = Backbone.Model.extend({ setClassRegistrants: function( registrants ){ for ( var i = 0; i < registrants.length; i++ ) { var foundClass = this.classes.findWhere({ id: registrants[i].class_id }); + console.log( foundClass ); if ( foundClass != undefined ) { foundClass.registrants.create( registrants[i] ); var newReg = foundClass.registrants.pop(); diff --git a/js/models/front/regTime.js b/js/models/front/regTime.js new file mode 100644 index 0000000..707e0f8 --- /dev/null +++ b/js/models/front/regTime.js @@ -0,0 +1,26 @@ +// js/models/front/regTime.js +// Event Reg Time Model +app.Models.Front.RegTime = Backbone.Model.extend({ + + // Default regTime values + defaults: { + id: 0, + reg_event: 0, + event_time: 0, + start_datetime: '', + end_datetime: '', + all_day: false, + attendees: false, + attendee_max: 0, + attendee_count: 0, + attendees_pending: 0, + attendees_available: 0, + descr: '', + parent: null, + }, + + initialize: function(){ + // Initial setting for model + this.registrants = new app.Collections.Front.RegRequestRegistrants( [] ); + }, +}); diff --git a/js/views/front/regClass.js b/js/views/front/regClass.js index a0f7715..d15d28d 100644 --- a/js/views/front/regClass.js +++ b/js/views/front/regClass.js @@ -13,38 +13,56 @@ app.Views.Front.RegClass = Backbone.View.extend({ this.listenTo( this.model.registrants, 'create', this.addOne ); this.listenTo( this.model.registrants, 'remove', this.deleteOne ); this.listenTo( this.model, 'change', this.render ); + this.listenTo( this.model.regTimes, 'add', this.render ); return this; }, events: { 'click .addRegistrant': 'newEntry', - 'click .glm-add-account': 'addAccount', - 'click .glm-add-new-account': 'addNewAccount', - 'click .add-new-registrant': 'addNew', - 'click .add-new-registrant-cancel': 'cancelAddNew', + // 'click .glm-add-account': 'addAccount', + // 'click .glm-add-new-account': 'addNewAccount', + // 'click .add-new-registrant': 'addNew', + // 'click .add-new-registrant-cancel': 'cancelAddNew', 'click .timeSelection': 'updateTimeSelection', }, - updateTimeSelection: function(){ - // Need to remove the newRegModal and views - if ( this.newRegAccount ) { - this.newRegAccount.destroy(); - this.newRegAccountView.remove(); + updateTimeSelection: function(e){ + // console.log(e); + // if ( this.newRegAccount ) { + // this.newRegAccount.destroy(); + // this.newRegAccountView.remove(); + // } + // Check to see if the time is already in the collection + // If it is then do nothing + var findRegTime = this.model.regTimes.get( e.currentTarget.value ); + if ( !findRegTime ) { + this.model.set({ selectedTime: parseInt( e.currentTarget.value ) }); + // Add the RegTime model/view into this view + var foundRegTime = app.times.get( e.currentTarget.value ); + foundRegTime.set({parent: this.model}); + this.model.regTimes.create( foundRegTime ); } - this.model.set({ selectedTime: parseInt( this.$('.timeSelection:checked').val() ) }); - console.log( this.$('.timeSelection:checked').val()); }, render: function(){ this.model.set({ reg_count: this.model.registrants.length }); this.$el.html( this.template( this.model.toJSON() ) ); - // Need to see if this class has attendees and render them - var view = this.model.registrants.map(function(item){ - return (new app.Views.Front.RegRequestRegistrant({ model: item })).render().el; + // Go through the RegTimes Collection and render those + // var view = this.model. + var view = this.model.regTimes.map(function(item){ + return (new app.Views.Front.RegTime({ model: item })).render().el; }); - var accountContainer = this.$('.reg-class-accounts'); - accountContainer.append(view); + var timeContainer = this.$('.reg-class-times'); + timeContainer.append( view ); + + // Need to see if this class has attendees and render them + // var view = this.model.registrants.map(function(item){ + // return (new app.Views.Front.RegRequestRegistrant({ model: item })).render().el; + // }); + // var accountContainer = this.$('.reg-class-accounts'); + // accountContainer.append(view); + if ( app.timeSpecific ) { // Need to require that the user select the time before entering attendees. } @@ -71,8 +89,14 @@ app.Views.Front.RegClass = Backbone.View.extend({ var times = this.model.get( 'times' ); var timeParts = []; _.each( times, function(time){ - var testDate = new Date( time.start_datetime.datetime ); - timeParts.push( {id: time.id,date: testDate, name: time.name} ); + var fDate = new Date( time.start_datetime.datetime ); + var tDate = new Date( time.end_datetime.datetime ); + timeParts.push( { + id: time.id, + fromDate: fDate, + toDate: tDate, + name: time.name + } ); }); // console.log( timeParts ); return timeParts; @@ -217,6 +241,7 @@ app.Views.Front.RegClass = Backbone.View.extend({ }, cancelAddNew: function(){ + this.$('.glm-add-new-account').show(); // this.newRegAccount.destroy(); this.newRegAccountView.remove(); // app.calendar = false; @@ -230,6 +255,7 @@ app.Views.Front.RegClass = Backbone.View.extend({ }, addNewAccount: function(){ + this.$('.glm-add-new-account').hide(); // Create the new Registrant View if ( app.timeSpecific ) { this.newRegAccount = new app.Models.Front.RegRequestRegistrant({ reg_time: this.model.get( 'selectedTime' ) }); diff --git a/js/views/front/regTime.js b/js/views/front/regTime.js new file mode 100644 index 0000000..9d62571 --- /dev/null +++ b/js/views/front/regTime.js @@ -0,0 +1,125 @@ +// js/views/regClass.js +var newId = 0; +app.Views.Front.RegTime = Backbone.View.extend({ + tagName: 'div', + + className: 'glm-row', + + template: _.template( jQuery('#regTime-template').html() ), + + initialize: function(){ + return this; + }, + + events: { + 'click .glm-add-new-account': 'addNewAccount', + 'click .add-new-registrant': 'insertNew', + 'click .add-new-registrant-cancel': 'cancelAddNew', + }, + + render: function(){ + this.model.set({ reg_count: this.model.registrants.length }); + this.$el.html( this.template( this.model.toJSON() ) ); + // Need to see if this has attendees and render them + var view = this.model.registrants.map(function(item){ + return (new app.Views.Front.RegRequestRegistrant({ model: item })).render().el; + }); + var accountContainer = this.$('.reg-class-accounts'); + accountContainer.append(view); + return this; + }, + + addNewAccount: function(){ + this.$('.glm-add-new-account').hide(); + // Create the new Registrant View + if ( app.timeSpecific ) { + this.newRegAccount = new app.Models.Front.RegRequestRegistrant({ reg_time: this.model.get( 'selectedTime' ) }); + } else { + this.newRegAccount = new app.Models.Front.RegRequestRegistrant(); + } + this.newRegAccountView = new app.Views.Front.RegistrantForm({model: this.newRegAccount}); + this.$el.append( this.newRegAccountView.render().el ); + }, + + insertNew: function(){ + var findByEmail = []; + var fname = this.$('.add_reg_fname').val().trim(); + var lname = this.$('.add_reg_lname').val().trim(); + var email = this.$('.add_reg_email').val().trim(); + var addr1 = this.$('.add_reg_addr1').val().trim(); + var addr2 = this.$('.add_reg_addr2').val().trim(); + var city = this.$('.add_reg_city').val().trim(); + var state = this.$('.add_reg_state').val().trim(); + var zip = this.$('.add_reg_zip').val().trim(); + var country = this.$('.add_reg_country').val().trim(); + var sTime = this.model.get( 'selectedTime' ); + if ( this.$('#add_reg-select-time').length ) { + var times = this.model.get( 'times' ); + var rateId = null; + // Setup the needed reg_rate + _.each( times, function( time ){ + if ( time.id == sTime ) { + rateId = time.rate_id; + } + } ); + } else { + var times = this.model.get( 'times' ); + var rateId = null; + _.each( times, function( time ){ + rateId = time.rate_id; + } ); + } + if ( fname === '' || lname === '' ) { + alert( 'First and Last name required!' ); + return; + } + if ( email === '' ) { + var confAnsw = confirm( 'You have no email address! Are you sure you want to add this registrant?' ); + if ( !confAnsw ) { + return; + } + } else { + findByEmail = this.model.registrants.where({email: email}); + } + var regRequest = cart.get( 'request' ); + if ( findByEmail.length === 0 ) { + this.model.registrants.create({ + 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( 'id' ), // Todo: use correct reg_class + event_name: regEvent.get( 'event_name' ), + reg_rate: rateId, + email: email, + fname: fname, + lname: lname, + addr1: addr1, + addr2: addr2, + city: city, + state: state, + zip: zip, + country: country, + }); + } + // this.newRegAccount.destroy(); + this.newRegAccountView.remove(); + // app.calendar = false; + }, + + cancelAddNew: function(){ + this.$('.glm-add-new-account').show(); + // this.newRegAccount.destroy(); + this.newRegAccountView.remove(); + // app.calendar = false; + if ( loginAccount != '' && this.model.hasMe() ) { + this.$('.glm-add-account').hide(); + // console.log('hiding'); + } else if ( loginAccount != '' ) { + this.$('.glm-add-account').show(); + // console.log('showing'); + } + }, + + +}); diff --git a/models/front/registrations/registration.php b/models/front/registrations/registration.php index b37fb63..3ff63b7 100644 --- a/models/front/registrations/registration.php +++ b/models/front/registrations/registration.php @@ -182,6 +182,7 @@ $jsonClasses = array(); $regClasses = array(); + $regTimes = array(); if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) { // Loop through the $regEvent['reg_class'] array to build $rClass array @@ -200,6 +201,9 @@ if ( $regEvent['time_specific'] ) { $rClass['selectedTime'] = $time['id']; } + if ( empty( $regtimes ) ) { + $regTimes[] = json_encode( $time, JSON_NUMERIC_CHECK ); + } } $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK ); } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) { @@ -212,7 +216,9 @@ // Build the regClass JSON for the template. $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']'; - $regCartJSON = json_encode( $cart ); + $regCartJSON = json_encode( $cart ); + $regTimesJSON = '[' . implode( ',', $regTimes ) . ']'; + // echo '
$regTimes: ' . print_r( $regTimesJSON, true ) . '
'; // Get terms into JSON $termsJSON = json_encode( $this->config['terms'] ); @@ -328,6 +334,7 @@ 'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js', 'regEventJSON' => json_encode( $event, JSON_NUMERIC_CHECK ), 'regClassesJSON' => $regClassJSON, + 'regTimesJSON' => $regTimesJSON, 'regCartJSON' => $regCartJSON, 'regRequestJSON' => $regRequestJSON, 'loginAccount' => $loginAccount, diff --git a/package.json b/package.json index c8a5fa1..a8cf496 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "gulp": "^3.9.1", "gulp-concat": "^2.6.1", "gulp-jshint": "^2.0.4", + "gulp-notify": "^3.0.0", "gulp-plumber": "^1.1.0", "gulp-sourcemaps": "^2.6.1", "gulp-uglify": "^3.0.0", diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index 7c6b570..f8f6626 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -67,17 +67,16 @@ <% _.each( this.getTimeArray(), function(time){ %> <% if ( curSchedule != time.name ) { %>
- <%= time.name %> - <%= time.date.toLocaleDateString('en-US') %> + <%= time.fromDate.toLocaleDateString('en-US') %>
<% } %> <% curSchedule = time.name; %> <% }); %> <% } else { %> @@ -93,15 +92,22 @@ <% if ( loggedIn ) { %> <% } %> - -
- {/literal}{$terms.reg_term_attendee_plur_cap}{literal} +
{/literal} +{* Template for regTime *}{literal} + +{/literal} {* Template for registrant add form *}{literal} -- 2.17.1