2013-07-05 11:39:52 +03:00
|
|
|
<script type="text/javascript"
|
|
|
|
src="<?php echo $base_url; ?>assets/js/libs/jquery/jquery-ui-timepicker-addon.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="<?php echo $base_url; ?>assets/js/backend_customers.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var GlobalVariables = {
|
|
|
|
'availableProviders': <?php echo json_encode($available_providers); ?>,
|
|
|
|
'availableServices': <?php echo json_encode($available_services); ?>,
|
|
|
|
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
2013-09-26 19:06:57 +03:00
|
|
|
'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-07-05 11:39:52 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
BackendCustomers.initialize(true);
|
|
|
|
});
|
|
|
|
</script>
|
2013-06-18 19:06:34 +03:00
|
|
|
|
2013-07-05 11:39:52 +03:00
|
|
|
<div id="customers-page" class="row-fluid">
|
2013-09-25 18:43:17 +03:00
|
|
|
<div id="filter-customers" class="filter-records column span4">
|
|
|
|
<form class="input-append">
|
2013-11-21 23:58:51 +02:00
|
|
|
<input class="key span12" type="text" />
|
|
|
|
<button class="filter btn" type="submit" title="Filter">
|
|
|
|
<i class="icon-search"></i>
|
2013-09-25 18:43:17 +03:00
|
|
|
</button>
|
2013-11-21 23:58:51 +02:00
|
|
|
<button class="clear btn" type="button" title="Clear">
|
|
|
|
<i class="icon-repeat"></i>
|
2013-09-25 18:43:17 +03:00
|
|
|
</button>
|
|
|
|
</form>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
|
|
|
<h2>Customers</h2>
|
2013-09-25 18:43:17 +03:00
|
|
|
<div class="results"></div>
|
2013-07-05 11:39:52 +03:00
|
|
|
</div>
|
|
|
|
|
2013-10-17 18:31:43 +03:00
|
|
|
<div class="details span7 row-fluid">
|
2013-07-15 17:27:19 +03:00
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div id="add-edit-delete-group" class="btn-group">
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php if ($privileges[PRIV_CUSTOMERS]['add'] == TRUE) { ?>
|
2013-10-10 19:50:33 +03:00
|
|
|
<button id="add-customer" class="btn btn-primary">
|
|
|
|
<i class="icon-plus icon-white"></i>
|
2013-07-15 17:27:19 +03:00
|
|
|
Add</button>
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if ($privileges[PRIV_CUSTOMERS]['edit'] == TRUE) { ?>
|
2013-07-15 17:27:19 +03:00
|
|
|
<button id="edit-customer" class="btn" disabled="disabled">
|
|
|
|
<i class="icon-pencil"></i>
|
|
|
|
Edit</button>
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php }?>
|
|
|
|
|
|
|
|
<?php if ($privileges[PRIV_CUSTOMERS]['delete'] == TRUE) { ?>
|
2013-07-15 17:27:19 +03:00
|
|
|
<button id="delete-customer" class="btn" disabled="disabled">
|
|
|
|
<i class="icon-remove"></i>
|
|
|
|
Delete</button>
|
2013-09-26 19:06:57 +03:00
|
|
|
<?php } ?>
|
2013-07-15 17:27:19 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="save-cancel-group" class="btn-group" style="display:none;">
|
2013-10-27 14:53:51 +02:00
|
|
|
<button id="save-customer" class="btn btn-primary">
|
2013-10-27 19:41:37 +02:00
|
|
|
<i class="icon-ok icon-white"></i>
|
2013-07-15 17:27:19 +03:00
|
|
|
Save</button>
|
|
|
|
<button id="cancel-customer" class="btn">
|
|
|
|
<i class="icon-ban-circle"></i>
|
|
|
|
Cancel</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input id="customer-id" type="hidden" />
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<div class="span6" style="margin-left: 0;">
|
2013-07-15 17:27:19 +03:00
|
|
|
<h2>Details</h2>
|
|
|
|
<div id="form-message" class="alert" style="display:none;"></div>
|
|
|
|
|
2013-10-10 19:50:33 +03:00
|
|
|
<label for="first-name">First Name *</label>
|
|
|
|
<input type="text" id="first-name" class="span11 required" />
|
2013-07-15 17:27:19 +03:00
|
|
|
|
|
|
|
<label for="last-name">Last Name *</label>
|
|
|
|
<input type="text" id="last-name" class="span11 required" />
|
|
|
|
|
|
|
|
<label for="email">Email *</label>
|
|
|
|
<input type="text" id="email" class="span11 required" />
|
|
|
|
|
|
|
|
<label for="phone-number">Phone Number *</label>
|
|
|
|
<input type="text" id="phone-number" class="span11 required" />
|
|
|
|
|
|
|
|
<label for="address">Address</label>
|
|
|
|
<input type="text" id="address" class="span11" />
|
|
|
|
|
|
|
|
<label for="city">City</label>
|
|
|
|
<input type="text" id="city" class="span11" />
|
|
|
|
|
|
|
|
<label for="zip-code">Zip Code</label>
|
|
|
|
<input type="text" id="zip-code" class="span11" />
|
|
|
|
|
|
|
|
<label for="notes">Notes</label>
|
|
|
|
<textarea id="notes" rows="4" class="span11"></textarea>
|
|
|
|
|
|
|
|
<br/><br/>
|
|
|
|
<center><em id="form-message" class="text-error">Fields with * are required!</em></center>
|
|
|
|
</div>
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<div class="span5">
|
2013-07-15 17:27:19 +03:00
|
|
|
<h2>Appointments</h2>
|
|
|
|
<div id="customer-appointments"></div>
|
|
|
|
<div id="appointment-details"></div>
|
|
|
|
</div>
|
2013-07-05 11:39:52 +03:00
|
|
|
</div>
|
|
|
|
</div>
|