var state = this.$('.add_reg_state').val().trim();
var zip = this.$('.add_reg_zip').val().trim();
var country = this.$('.add_reg_country').val().trim();
- if ( app.timeSpecific ) {
- var sTime = this.model.get( 'selectedTime' );
- } else {
- var sTime = null;
- }
+ var sTime = this.model.get( 'selectedTime' );
if ( this.$('#add_reg-select-time').length ) {
var times = this.model.get( 'times' );
var rateId = null;
render: function(){
this.$el.html( this.template( this.model.toJSON() ) );
this.$emailInput = this.$('.editEmail');
+ this.$('.reg-edit-form').hide();
return this;
},
var state = this.$('.add_reg_state').val().trim();
var zip = this.$('.add_reg_zip').val().trim();
var country = this.$('.add_reg_country').val().trim();
- if ( app.timeSpecific ) {
- var sTime = this.model.get( 'selectedTime' );
- } else {
- var sTime = null;
- }
+ var sTime = this.model.get( 'selectedTime' );
if ( this.$('#add_reg-select-time').length ) {
var times = this.model.get( 'times' );
var rateId = null;
render: function(){
this.$el.html( this.template( this.model.toJSON() ) );
this.$emailInput = this.$('.editEmail');
+ this.$('.reg-edit-form').hide();
return this;
},
$rClass['reg_rate_name'] = $time['name'];
$rClass['reg_rate_base_price'] = $time['base_rate'];
$rClass['reg_rate_per_reg'] = $time['per_registrant'];
+ if ( $regEvent['time_specific'] ) {
+ $rClass['selectedTime'] = $time['id'];
+ }
}
$jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK );
} else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) {
<div class="glm-columns glm-small-12 glm-large-12"> Base Rate: $<%= reg_rate_base_price %> </div>
<div class="glm-columns glm-small-12 glm-large-12"> Per Registrant: $<%= reg_rate_per_reg %> </div>
<div class="glm-columns glm-small-12 glm-large-12">
- <b>Select a time</b>
- <% _.each( this.getTimeArray(), function(time){ %>
- <label>
- <input class="timeSelection" type="radio" name="timeOption" value="<%= time.id %>"
- <% if ( selectedTime == time.id ) { %>
- checked
- <% } %>
- /> <%= time.date.toLocaleTimeString('en-US', {hour: '2-digit', minute: '2-digit'}) %>
- </label>
- <% }); %>
+ <% if ( app.timeSpecific ) { %>
+ <b>Select a time</b>
+ <% _.each( this.getTimeArray(), function(time){ %>
+ <label>
+ <input class="timeSelection" type="radio" name="timeOption" value="<%= time.id %>"
+ <% if ( selectedTime == time.id ) { %>
+ checked
+ <% } %>
+ /> <%= time.date.toLocaleTimeString('en-US', {hour: '2-digit', minute: '2-digit'}) %>
+ </label>
+ <% }); %>
+ <% } else { %>
+ <% _.each( this.getTimeArray(), function(time){ %>
+ <input class="timeSelection" type="hidden" name="timeOption" value="<%= time.id %>">
+ <% }); %>
+ <% } %>
</div>
</div>
</div>