2013-04-14 22:42:40 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2013-10-17 18:31:43 +03:00
|
|
|
<title>Book Appointment With <?php echo $company_name; ?></title>
|
2013-04-17 00:37:36 +03:00
|
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
// INCLUDE CSS FILES
|
|
|
|
// ------------------------------------------------------------ ?>
|
2013-05-17 16:09:10 +03:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/css/libs/bootstrap/bootstrap.css">
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/css/libs/bootstrap/bootstrap-responsive.css">
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/css/libs/jquery/jquery-ui.min.css">
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/css/libs/jquery/jquery.qtip.min.css">
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
2013-06-12 18:31:16 +03:00
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/css/frontend.css">
|
2013-10-18 17:56:12 +03:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/css/general.css">
|
2013-04-14 22:42:40 +03:00
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
// INCLUDE JAVASCRIPT FILES
|
|
|
|
// ------------------------------------------------------------ ?>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/libs/jquery/jquery.min.js"></script>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/libs/jquery/jquery-ui.min.js"></script>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/libs/jquery/jquery.qtip.min.js"></script>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/libs/bootstrap/bootstrap.min.js"></script>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/libs/date.js"></script>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/frontend_book.js"></script>
|
2013-05-17 16:09:10 +03:00
|
|
|
<script
|
|
|
|
type="text/javascript"
|
2013-06-12 18:31:16 +03:00
|
|
|
src="<?php echo $this->config->base_url(); ?>assets/js/general_functions.js"></script>
|
2013-04-14 22:42:40 +03:00
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
// WEBPAGE FAVICON
|
|
|
|
// ------------------------------------------------------------ ?>
|
2013-05-17 16:09:10 +03:00
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/x-icon"
|
|
|
|
href="<?php echo $this->config->base_url(); ?>assets/images/favicon.ico">
|
2013-04-14 22:42:40 +03:00
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
// VIEW FILE JAVASCRIPT CODE
|
|
|
|
// ------------------------------------------------------------ ?>
|
2013-04-20 20:20:16 +03:00
|
|
|
<script type="text/javascript">
|
|
|
|
GlobalVariables = {
|
2013-06-03 17:42:19 +03:00
|
|
|
availableServices : <?php echo json_encode($available_services); ?>,
|
|
|
|
availableProviders : <?php echo json_encode($available_providers); ?>,
|
|
|
|
baseUrl : <?php echo '"' . $this->config->base_url() . '"'; ?>,
|
|
|
|
manageMode : <?php echo ($manage_mode) ? 'true' : 'false'; ?>,
|
|
|
|
appointmentData : <?php echo json_encode($appointment_data); ?>,
|
|
|
|
providerData : <?php echo json_encode($provider_data); ?>,
|
|
|
|
customerData : <?php echo json_encode($customer_data); ?>
|
|
|
|
};
|
|
|
|
|
2013-04-14 22:42:40 +03:00
|
|
|
$(document).ready(function() {
|
2013-06-12 18:31:16 +03:00
|
|
|
FrontendBook.initialize(true, GlobalVariables.manageMode);
|
2013-06-03 17:42:19 +03:00
|
|
|
GeneralFunctions.centerElementOnPage($('#book-appointment-wizard'));
|
2013-04-14 22:42:40 +03:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="main" class="container">
|
2013-06-03 17:42:19 +03:00
|
|
|
|
|
|
|
<div id="book-appointment-wizard">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// FRAME TOP BAR
|
|
|
|
// ------------------------------------------------------ ?>
|
|
|
|
<div id="header">
|
|
|
|
<span id="company-name"><?php echo $company_name; ?></span>
|
|
|
|
|
|
|
|
<div id="steps">
|
2013-04-14 22:42:40 +03:00
|
|
|
<div id="step-1" class="book-step active-step" title="Select Service & Provider">
|
|
|
|
<strong>1</strong>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="step-2" class="book-step" title="Select Appointment Date">
|
|
|
|
<strong>2</strong>
|
|
|
|
</div>
|
|
|
|
<div id="step-3" class="book-step" title="Your Information">
|
|
|
|
<strong>3</strong>
|
|
|
|
</div>
|
|
|
|
<div id="step-4" class="book-step" title="Confirm Appointment">
|
|
|
|
<strong>4</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-06-03 17:42:19 +03:00
|
|
|
|
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// CANCEL APPOINTMENT BUTTON
|
|
|
|
// ------------------------------------------------------
|
|
|
|
if ($manage_mode === TRUE) {
|
|
|
|
echo '
|
|
|
|
<div id="cancel-appointment-frame">
|
|
|
|
<p>
|
|
|
|
Press the "Cancel" button to remove the appointment
|
|
|
|
from the company schedule.
|
|
|
|
</p>
|
2013-07-03 20:27:00 +03:00
|
|
|
<form id="cancel-appointment-form" method="post"
|
2013-06-10 18:51:23 +03:00
|
|
|
action="' . $this->config->item('base_url')
|
2013-06-08 12:54:45 +03:00
|
|
|
. 'appointments/cancel/' . $appointment_data['hash'] . '">
|
2013-07-03 20:27:00 +03:00
|
|
|
<textarea name="cancel_reason" style="display:none;"></textarea>
|
2013-06-08 12:54:45 +03:00
|
|
|
<button id="cancel-appointment" class="btn btn-inverse">
|
|
|
|
Cancel</button>
|
|
|
|
</form>
|
2013-06-03 17:42:19 +03:00
|
|
|
</div>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2013-07-02 20:18:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// DISPLAY EXCEPTIONS (IF ANY)
|
|
|
|
// ------------------------------------------------------
|
|
|
|
if (isset($exceptions)) {
|
|
|
|
echo '<div style="margin: 10px">';
|
|
|
|
echo '<h4>Unexpected Errors</h4>';
|
|
|
|
foreach($exceptions as $exception) {
|
|
|
|
echo exceptionToHtml($exception);
|
|
|
|
}
|
|
|
|
echo '</div>';
|
|
|
|
}
|
|
|
|
?>
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// SELECT SERVICE AND PROVIDER
|
|
|
|
// ------------------------------------------------------ ?>
|
|
|
|
<div id="wizard-frame-1" class="wizard-frame">
|
|
|
|
<div class="frame-container">
|
|
|
|
<h2 class="frame-title">Select Service & Provider</h2>
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<div class="frame-content" style="width:520px">
|
2013-06-03 17:42:19 +03:00
|
|
|
<label for="select-service">
|
|
|
|
<strong>Select Service</strong>
|
|
|
|
</label>
|
|
|
|
|
2013-04-20 20:20:16 +03:00
|
|
|
<select id="select-service">
|
|
|
|
<?php
|
2013-09-13 16:21:03 +03:00
|
|
|
// Group services by category, only if there is at least one service
|
|
|
|
// with a parent category.
|
2013-05-04 00:26:04 +03:00
|
|
|
foreach($available_services as $service) {
|
2013-09-13 16:21:03 +03:00
|
|
|
if ($service['category_id'] != NULL) {
|
|
|
|
$has_category = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($has_category) {
|
2013-10-21 15:36:40 +03:00
|
|
|
$grouped_services = array();
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
foreach($available_services as $service) {
|
|
|
|
if ($service['category_id'] != NULL) {
|
|
|
|
if (!isset($grouped_services[$service['category_name']])) {
|
|
|
|
$grouped_services[$service['category_name']] = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
$grouped_services[$service['category_name']][] = $service;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// We need the uncategorized services at the end of the list so
|
|
|
|
// we will use another iteration only for the uncategorized services.
|
2013-10-21 15:36:40 +03:00
|
|
|
$grouped_services['uncategorized'] = array();
|
2013-09-13 16:21:03 +03:00
|
|
|
foreach($available_services as $service) {
|
|
|
|
if ($service['category_id'] == NULL) {
|
|
|
|
$grouped_services['uncategorized'][] = $service;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach($grouped_services as $group) {
|
|
|
|
$group_label = ($group[0]['category_name'] != NULL)
|
|
|
|
? $group[0]['category_name'] : 'Uncategorized';
|
|
|
|
|
|
|
|
echo '<optgroup label="' . $group_label . '">';
|
|
|
|
foreach($group as $service) {
|
|
|
|
echo '<option value="' . $service['id'] . '">'
|
|
|
|
. $service['name'] . '</option>';
|
|
|
|
}
|
|
|
|
echo '</optgroup>';
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
foreach($available_services as $service) {
|
|
|
|
echo '<option value="' . $service['id'] . '">'
|
|
|
|
. $service['name'] . '</option>';
|
|
|
|
}
|
2013-04-20 20:20:16 +03:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<label for="select-provider">
|
|
|
|
<strong>Select Provider</strong>
|
|
|
|
</label>
|
|
|
|
|
2013-04-20 20:20:16 +03:00
|
|
|
<select id="select-provider"></select>
|
2013-09-13 16:21:03 +03:00
|
|
|
|
|
|
|
<div id="service-description" style="display:none;"></div>
|
2013-04-20 20:20:16 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-14 22:42:40 +03:00
|
|
|
|
2013-04-17 00:37:36 +03:00
|
|
|
<div class="command-buttons">
|
2013-05-17 16:09:10 +03:00
|
|
|
<button type="button" id="button-next-1" class="btn button-next btn-primary"
|
|
|
|
data-step_index="1">Next <i class="icon-forward icon-white"></i></button>
|
2013-04-17 00:37:36 +03:00
|
|
|
</div>
|
2013-04-14 22:42:40 +03:00
|
|
|
</div>
|
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// SELECT APPOINTMENT DATE
|
|
|
|
// ------------------------------------------------------ ?>
|
|
|
|
<div id="wizard-frame-2" class="wizard-frame" style="display:none;">
|
|
|
|
<div class="frame-container">
|
|
|
|
|
|
|
|
<h2 class="frame-title">Select Appointment Date And Time</h2>
|
|
|
|
|
|
|
|
<div class="frame-content" style="width:600px">
|
2013-05-20 20:21:58 +03:00
|
|
|
<div class="span3">
|
|
|
|
<div id="select-date"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="span3">
|
|
|
|
<?php // Available hours are going to be fetched via ajax call. ?>
|
|
|
|
<div id="available-hours"></div>
|
|
|
|
</div>
|
2013-04-20 20:20:16 +03:00
|
|
|
</div>
|
2013-04-17 00:37:36 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="command-buttons">
|
2013-05-17 16:09:10 +03:00
|
|
|
<button type="button" id="button-back-2" class="btn button-back"
|
|
|
|
data-step_index="2"><i class="icon-backward"></i> Back</button>
|
|
|
|
<button type="button" id="button-next-2" class="btn button-next btn-primary"
|
|
|
|
data-step_index="2">Next <i class="icon-forward icon-white"></i></button>
|
2013-04-17 00:37:36 +03:00
|
|
|
</div>
|
2013-04-14 22:42:40 +03:00
|
|
|
</div>
|
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// ENTER CUSTOMER DATA
|
|
|
|
// ------------------------------------------------------ ?>
|
|
|
|
<div id="wizard-frame-3" class="wizard-frame" style="display:none;">
|
|
|
|
<div class="frame-container">
|
|
|
|
|
|
|
|
<h2 class="frame-title">Fill In Your Information</h2>
|
|
|
|
|
|
|
|
<div class="frame-content" style="width:600px">
|
2013-05-20 20:21:58 +03:00
|
|
|
<div class="span3">
|
2013-10-10 19:50:33 +03:00
|
|
|
<label for="first-name">First Name *</label>
|
|
|
|
<input type="text" id="first-name" class="required" maxlength="100" />
|
2013-06-20 00:12:06 +03:00
|
|
|
|
|
|
|
<label for="last-name">Last Name *</label>
|
|
|
|
<input type="text" id="last-name" class="required" maxlength="250" />
|
2013-04-14 22:42:40 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<label for="email">Email *</label>
|
|
|
|
<input type="text" id="email" class="required" maxlength="250" />
|
2013-04-14 22:42:40 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<label for="phone-number">Phone Number *</label>
|
|
|
|
<input type="text" id="phone-number" class="required" maxlength="60" />
|
2013-04-17 00:37:36 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<br/><br/>
|
2013-06-29 00:54:12 +03:00
|
|
|
<em id="form-message" class="text-error">Fields with * are required!</em>
|
2013-05-20 20:21:58 +03:00
|
|
|
</div>
|
2013-04-17 00:37:36 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<div class="span3">
|
|
|
|
<label for="address">Address</label>
|
|
|
|
<input type="text" id="address" maxlength="250" />
|
2013-04-17 00:37:36 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<label for="city">City</label>
|
|
|
|
<input type="text" id="city" maxlength="120" />
|
2013-04-20 20:20:16 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<label for="zip-code">Zip Code</label>
|
|
|
|
<input type="text" id="zip-code" maxlength="120" />
|
2013-04-20 20:20:16 +03:00
|
|
|
|
2013-05-20 20:21:58 +03:00
|
|
|
<label for="notes">Notes</label>
|
|
|
|
<textarea id="notes" maxlength="500" rows="4"></textarea>
|
|
|
|
</div>
|
2013-04-20 20:20:16 +03:00
|
|
|
</div>
|
2013-04-17 00:37:36 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="command-buttons">
|
2013-05-17 16:09:10 +03:00
|
|
|
<button type="button" id="button-back-3" class="btn button-back"
|
|
|
|
data-step_index="3"><i class="icon-backward"></i> Back</button>
|
|
|
|
<button type="button" id="button-next-3" class="btn button-next btn-primary"
|
|
|
|
data-step_index="3">Next <i class="icon-forward icon-white"></i></button>
|
2013-04-17 00:37:36 +03:00
|
|
|
</div>
|
2013-04-14 22:42:40 +03:00
|
|
|
</div>
|
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// APPOINTMENT DATA CONFIRMATION
|
|
|
|
// ------------------------------------------------------ ?>
|
|
|
|
<div id="wizard-frame-4" class="wizard-frame" style="display:none;">
|
|
|
|
<div class="frame-container">
|
|
|
|
<h2 class="frame-title">Confirm Appointment</h2>
|
|
|
|
<div class="frame-content" style="width:600px">
|
2013-06-20 00:12:06 +03:00
|
|
|
<div id="appointment-details" class="span3"></div>
|
|
|
|
<div id="customer-details" class="span3"></div>
|
2013-05-20 20:21:58 +03:00
|
|
|
</div>
|
2013-04-17 00:37:36 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="command-buttons">
|
2013-05-17 16:09:10 +03:00
|
|
|
<button type="button" id="button-back-4" class="btn button-back"
|
|
|
|
data-step_index="4"><i class="icon-backward"></i> Back</button>
|
2013-04-20 20:20:16 +03:00
|
|
|
<form id="book-appointment-form" style="display:inline-block" method="post">
|
2013-05-17 16:09:10 +03:00
|
|
|
<button type="submit" class="btn btn-success">
|
2013-06-03 17:42:19 +03:00
|
|
|
<i class="icon-ok icon-white"></i>
|
|
|
|
<?php
|
|
|
|
echo (!$manage_mode) ? "Confirm" : "Update";
|
|
|
|
?>
|
|
|
|
</button>
|
2013-05-04 00:26:04 +03:00
|
|
|
<input type="hidden" name="post_data" />
|
2013-04-17 00:37:36 +03:00
|
|
|
</form>
|
|
|
|
</div>
|
2013-04-14 22:42:40 +03:00
|
|
|
</div>
|
|
|
|
|
2013-06-03 17:42:19 +03:00
|
|
|
<?php
|
|
|
|
// ------------------------------------------------------
|
|
|
|
// FRAME FOOTER
|
|
|
|
// ------------------------------------------------------ ?>
|
2013-04-14 22:42:40 +03:00
|
|
|
<div id="frame-footer">
|
2013-06-03 17:42:19 +03:00
|
|
|
Powered By
|
2013-10-11 18:58:46 +03:00
|
|
|
<a href="http://easyappointments.org" target="_blank">
|
2013-06-03 17:42:19 +03:00
|
|
|
Easy!Appointments
|
|
|
|
</a>
|
2013-04-14 22:42:40 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
2013-04-20 20:20:16 +03:00
|
|
|
</html>
|