2013-06-12 18:31:16 +03:00
|
|
|
<link rel="stylesheet" type="text/css"
|
|
|
|
href="<?php echo $base_url; ?>assets/css/libs/jquery/fullcalendar.css" />
|
|
|
|
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="<?php echo $base_url; ?>assets/js/libs/jquery/fullcalendar.min.js"></script>
|
2013-06-18 19:06:34 +03:00
|
|
|
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="<?php echo $base_url; ?>assets/js/libs/jquery/jquery-ui-timepicker-addon.js"></script>
|
2013-06-12 18:31:16 +03:00
|
|
|
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="<?php echo $base_url; ?>assets/js/backend_calendar.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var GlobalVariables = {
|
|
|
|
'availableProviders' : <?php echo json_encode($available_providers); ?>,
|
|
|
|
'availableServices' : <?php echo json_encode($available_services); ?>,
|
2013-06-29 00:54:12 +03:00
|
|
|
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
|
2013-07-10 16:57:24 +03:00
|
|
|
'bookAdvanceTimeout' : <?php echo $book_advance_timeout; ?>,
|
2013-09-26 19:06:57 +03:00
|
|
|
'editAppointment' : <?php echo json_encode($edit_appointment); ?>,
|
|
|
|
'customers' : <?php echo json_encode($customers); ?>,
|
|
|
|
'user' : {
|
|
|
|
'id' : <?php echo $user_id; ?>,
|
|
|
|
'email' : <?php echo '"' . $user_email . '"'; ?>,
|
|
|
|
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
|
|
|
|
'privileges': <?php echo json_encode($privileges); ?>
|
|
|
|
}
|
2013-06-12 18:31:16 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
BackendCalendar.initialize(true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="calendar-page">
|
|
|
|
<div id="calendar-toolbar">
|
|
|
|
<div id="calendar-filter">
|
2013-06-13 19:25:34 +03:00
|
|
|
<label for="select-filter-item">Display Calendar</label>
|
|
|
|
<select id="select-filter-item"></select>
|
2013-06-12 18:31:16 +03:00
|
|
|
</div>
|
|
|
|
|
2013-06-19 22:29:00 +03:00
|
|
|
<div id="calendar-actions">
|
|
|
|
<div class="btn-group">
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php if ($privileges[PRIV_USERS]['edit'] == TRUE) { ?>
|
2013-06-19 22:29:00 +03:00
|
|
|
<button id="google-sync" class="btn btn-primary"
|
|
|
|
title="Trigger the Google Calendar synchronization process.">
|
|
|
|
<i class="icon-refresh icon-white"></i>
|
|
|
|
<span>Synchronize</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button id="enable-sync" class="btn" data-toggle="button"
|
|
|
|
title="Enable appointment synchronization with provider's Google Calendar account.">
|
|
|
|
<i class="icon-calendar"></i>
|
|
|
|
<span>Enable Sync</span>
|
|
|
|
</button>
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php } ?>
|
2013-06-24 12:52:23 +03:00
|
|
|
|
|
|
|
<button id="reload-appointments" class="btn" title="Reload calendar appointments.">
|
|
|
|
<i class="icon-repeat"></i>
|
|
|
|
<span>Reload</span>
|
|
|
|
</button>
|
2013-06-19 22:29:00 +03:00
|
|
|
</div>
|
2013-06-18 19:06:34 +03:00
|
|
|
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php if ($privileges[PRIV_APPOINTMENTS]['add'] == TRUE) { ?>
|
2013-06-19 22:29:00 +03:00
|
|
|
<div class="btn-group">
|
2013-09-26 19:06:57 +03:00
|
|
|
<button id="insert-appointment" class="btn btn-info"
|
2013-06-19 22:29:00 +03:00
|
|
|
title="Create a new appointment and store it into the database.">
|
2013-09-26 19:06:57 +03:00
|
|
|
<i class="icon-plus icon-white"></i>
|
2013-06-19 22:29:00 +03:00
|
|
|
<span>Appointment</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button id="insert-unavailable" class="btn"
|
2013-07-09 17:46:48 +03:00
|
|
|
title="During unavailable periods the provider won't accept new appointments.">
|
2013-09-26 19:06:57 +03:00
|
|
|
<i class="icon-plus"></i>
|
2013-06-19 22:29:00 +03:00
|
|
|
<span>Unavailable</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php } ?>
|
2013-06-12 18:31:16 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-07-09 17:46:48 +03:00
|
|
|
<div id="calendar"></div> <?php // Main calendar container ?>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="manage-appointment" class="modal hide fade">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal"
|
|
|
|
aria-hidden="true">×</button>
|
|
|
|
<h3>Edit Appointment</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
2013-09-27 15:49:29 +03:00
|
|
|
<div class="modal-message alert" style="display: none;"></div>
|
|
|
|
|
2013-06-13 19:25:34 +03:00
|
|
|
<form class="form-horizontal">
|
|
|
|
<fieldset>
|
|
|
|
<legend>Appointment Details</legend>
|
|
|
|
|
2013-06-18 19:06:34 +03:00
|
|
|
<input id="appointment-id" type="hidden" />
|
|
|
|
|
2013-06-13 19:25:34 +03:00
|
|
|
<div class="control-group">
|
|
|
|
<label for="select-service" class="control-label">Service</label>
|
|
|
|
<div class="controls">
|
|
|
|
<select id="select-service"></select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="select-provider" class="control-label">Provider</label>
|
|
|
|
<div class="controls">
|
|
|
|
<select id="select-provider"></select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="control-group">
|
2013-06-18 19:06:34 +03:00
|
|
|
<label for="start-datetime" class="control-label">Start Date/Time</label>
|
2013-06-13 19:25:34 +03:00
|
|
|
<div class="controls">
|
2013-06-18 19:06:34 +03:00
|
|
|
<input type="text" id="start-datetime" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="end-datetime" class="control-label">End Date/Time</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="end-datetime" />
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<fieldset class="row-fluid">
|
2013-09-26 19:06:57 +03:00
|
|
|
<legend>
|
|
|
|
Customer Details
|
2013-09-27 15:49:29 +03:00
|
|
|
<button id="new-customer" class="btn btn-mini" title="Clear the fields and enter a new customer."
|
|
|
|
type="button">New</button>
|
2013-09-26 19:06:57 +03:00
|
|
|
<button id="select-customer" class="btn btn-primary btn-mini"
|
2013-09-27 15:49:29 +03:00
|
|
|
title="Pick an existing customer." type="button">Select</button>
|
2013-09-26 19:06:57 +03:00
|
|
|
<input type="text" id="filter-existing-customers" placeholder="Type to filter customers."
|
|
|
|
style="display: none;" class="input-medium"/>
|
|
|
|
<div id="existing-customers-list" style="display: none;"></div>
|
|
|
|
</legend>
|
2013-06-13 19:25:34 +03:00
|
|
|
|
2013-06-18 19:06:34 +03:00
|
|
|
<input id="customer-id" type="hidden" />
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<div class="span5">
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="first-name" class="control-label">First Name</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="first-name" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="last-name" class="control-label">Last Name *</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="last-name" class="required" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="email" class="control-label">Email *</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="email" class="required" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="phone-number" class="control-label">Phone Number *</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="phone-number" class="required" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
<div class="span6">
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="address" class="control-label">Address</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="address" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="city" class="control-label">City</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="city" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="zip-code" class="control-label">Zip Code</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="zip-code" />
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="notes" class="control-label">Notes</label>
|
|
|
|
<div class="controls">
|
|
|
|
<textarea id="notes"></textarea>
|
|
|
|
</div>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
2013-07-09 17:46:48 +03:00
|
|
|
<button id="save-appointment" class="btn btn-primary">Save</button>
|
|
|
|
<button id="cancel-appointment" class="btn">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="manage-unavailable" class="modal hide fade">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal"
|
|
|
|
aria-hidden="true">×</button>
|
|
|
|
<h3>Add Unavailable Period</h3>
|
2013-09-26 19:06:57 +03:00
|
|
|
|
2013-07-09 17:46:48 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
2013-09-27 15:49:29 +03:00
|
|
|
<div class="modal-message alert" style="display: none;"></div>
|
|
|
|
|
2013-07-09 17:46:48 +03:00
|
|
|
<form class="form-horizontal">
|
|
|
|
<fieldset>
|
|
|
|
<input id="unavailable-id" type="hidden" />
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="unavailable-start" class="control-label">Start</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="unavailable-start" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="unavailable-end" class="control-label">End</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" id="unavailable-end" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="unavailable-notes" class="control-label">Notes</label>
|
|
|
|
<div class="controls">
|
|
|
|
<textarea id="unavailable-notes"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button id="save-unavailable" class="btn btn-primary">Save</button>
|
|
|
|
<button id="cancel-unavailable" class="btn">Cancel</button>
|
2013-06-13 19:25:34 +03:00
|
|
|
</div>
|
2013-06-12 18:31:16 +03:00
|
|
|
</div>
|