<p><h3>Dates and Availability</h3></p>
<p>Event occurs every day from first day to last day at the times shown.</p>
<table>
- {foreach $regEvent.recurrenceSummary as $rs}
- <tr><th>First Day of Event: </th><td>{$rs.firstTime.start_time.datetime} - {$rs.firstTime.end_time.datetime}</td></tr>
- <tr><th>Last Day of Event: </th><td>{$rs.lastTime.start_time.datetime} - {$rs.lastTime.end_time.datetime}</td></tr>
- {/foreach}
{foreach $regEvent.reg_time as $rt}
{if $rt.non_time_specific.value}
{if $rt.attendee_max == 0}
{if $regEvent.time_specific.value}
<tr id="dialogTrackLine"><th style="text-align: left">Track Attendees:</th><td><input id="dialogAttendees" type="checkbox" value=""></td></tr>
{/if}
- <tr id="dialogStartTimeLine"><th style="text-align: left">Start Time:</th><td><input id="dialogStartTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
- <tr id="dialogEndTimeLine"><th style="text-align: left">End Time:</th><td><input id="dialogEndTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
+ <tr id="dialogStartTimeLine"><th style="text-align: left" class="glm-required">Start Time:</th><td><input id="dialogStartTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
+ <tr id="dialogEndTimeLine"><th style="text-align: left" class="glm-required">End Time:</th><td><input id="dialogEndTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
{if $regEvent.time_specific.value}
<tr><th style="text-align: left">Maximum Attendees:</th><td><input class="glm-form-text-input-veryshort availabilityInput" type="text" id="dialogMaxAtt" value=""> 0 = Unlimited</td></tr>
<tr id="dialogRegLine"><th style="text-align: left">Registered Attendees:</th><td id="dialogRegAtt"></td></tr>
function initFullCalendar(){
$('#eventCalendar').fullCalendar({
+ timezone: 'local',
{if $regEvent}
// Add existing registration dates/times
events: [
{/foreach}
{/if}
],
- // Clicking on a date cell (not a reg event) Brings up the new reg event dialog
+ // Clicking on a date cell (not an existing event time) Brings up the new date dialog
dayClick: function(date, allDay, jsEvent, view) {
$('#dialogAvailSubmit').off('click');
-
- $('#availabilityTitle').html('Create New: '+date.format());
+ $('#availabilityTitle').html('Create New: '+date.format('MM/DD/YYYY'));
$('#availabilityEditDialog').dialog('open');
- $('#dialogRegActive').prop('checked', true);
+ $('#dialogRegActive').prop('checked', false);
$('#dialogTimeAllDay').prop('checked', false);
$('#dialogStartTime').val('');
$('#dialogEndTime').val('');
$('#dialogAvailLine').hide();
$('#dialogAvailSubmit').on('click', function() {
+ if ($('#dialogStartTime').val() == '' || $('#dialogEndTime').val() == '') {
+ alert('Both start and end times are required!');
+ } else {
+
// Submit clicked
- var max = $('#dialogMaxAtt').val();
+ {if $regEvent.time_specific.value}
+ var max = $('#dialogMaxAtt').val();
+ {else}
+ var max = 0;
+ {/if}
var startDate = new Date($('#dialogStartTime').val());
var startTime = $('#dialogStartTime').val();
// Initialize the event data object with submitted data
var newEvent = {
{if $regEvent.time_specific.value}
- title: startTime + ' unlimited',
+ title: ' unlimited',
{else}
title: '',
{/if}
active: $('#dialogRegActive').is(":checked"),
backgroundColor: '#aaa',
allDay: $('#dialogTimeAllDay').is(':checked'),
- attendees: $('#dialogAttendees').is(':checked'),
+ {if $regEvent.time_specific.value}
+ attendees: $('#dialogAttendees').is(':checked'),
+ {else}
+ attendees: 0,
+ {/if}
max: max,
count: 0,
pending: 0,
{if $regEvent.time_specific.value}
// If max or active is set, override the defaults
if (newEvent.max > 0 ) {
- newEvent.title = startTime + ' ' + newEvent.max + '-0-0-' + newEvent.max
+ newEvent.title = ' ' + newEvent.max + '-0-0-' + newEvent.max
}
if (newEvent.active) {
newEvent.backgroundColor = 'light-blue';
});
+ }
});
},