2013-07-05 11:39:52 +03:00
|
|
|
<script type="text/javascript"
|
2015-07-08 01:17:39 +03:00
|
|
|
src="<?php echo $base_url; ?>/assets/ext/jquery-ui/jquery-ui-timepicker-addon.js"></script>
|
2013-07-05 11:39:52 +03:00
|
|
|
|
|
|
|
<script type="text/javascript"
|
2015-01-29 00:53:13 +02:00
|
|
|
src="<?php echo $base_url; ?>/assets/js/backend_customers.js"></script>
|
2013-07-05 11:39:52 +03:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var GlobalVariables = {
|
2015-05-28 00:47:19 +03:00
|
|
|
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
2013-07-05 11:39:52 +03:00
|
|
|
'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
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div id="customers-page" class="row">
|
|
|
|
<div id="filter-customers" class="filter-records column col-md-4">
|
2013-09-25 18:43:17 +03:00
|
|
|
<form class="input-append">
|
2013-11-21 23:58:51 +02:00
|
|
|
<input class="key span12" type="text" />
|
2015-07-25 12:55:58 +03:00
|
|
|
<button class="filter btn btn-sm" type="submit" title="<?php echo $this->lang->line('filter'); ?>">
|
|
|
|
<span class="glyphicon glyphicon-search"></span>
|
|
|
|
</button>
|
|
|
|
<button class="clear btn btn-sm" type="button" title="<?php echo $this->lang->line('clear'); ?>">
|
|
|
|
<span class="glyphicon glyphicon-repeat"></span>
|
|
|
|
</button>
|
2013-09-25 18:43:17 +03:00
|
|
|
</form>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('customers'); ?></h2>
|
2013-09-25 18:43:17 +03:00
|
|
|
<div class="results"></div>
|
2013-07-05 11:39:52 +03:00
|
|
|
</div>
|
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="details col-md-7 row">
|
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">
|
2015-07-25 12:55:58 +03:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('add'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</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">
|
2015-07-25 12:55:58 +03:00
|
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('edit'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</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">
|
2015-07-25 12:55:58 +03:00
|
|
|
<span class="glyphicon glyphicon-remove"></span>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('delete'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</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">
|
2015-07-25 12:55:58 +03:00
|
|
|
<span class="glyphicon glyphicon-ok"></span>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('save'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-15 17:27:19 +03:00
|
|
|
<button id="cancel-customer" class="btn">
|
2015-07-25 12:55:58 +03:00
|
|
|
<i class="glyphicon glyphicon-ban-circle"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('cancel'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-15 17:27:19 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input id="customer-id" type="hidden" />
|
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="col-md-6" style="margin-left: 0;">
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('details'); ?></h2>
|
2013-07-15 17:27:19 +03:00
|
|
|
<div id="form-message" class="alert" style="display:none;"></div>
|
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="first-name"><?php echo $this->lang->line('first_name'); ?> *</label>
|
|
|
|
<input type="text" id="first-name" class="form-control required" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="last-name"><?php echo $this->lang->line('last_name'); ?> *</label>
|
|
|
|
<input type="text" id="last-name" class="form-control required" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="email"><?php echo $this->lang->line('email'); ?> *</label>
|
|
|
|
<input type="text" id="email" class="form-control required" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="phone-number"><?php echo $this->lang->line('phone_number'); ?> *</label>
|
|
|
|
<input type="text" id="phone-number" class="form-control required" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="address"><?php echo $this->lang->line('address'); ?></label>
|
|
|
|
<input type="text" id="address" class="form-control" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="city"><?php echo $this->lang->line('city'); ?></label>
|
|
|
|
<input type="text" id="city" class="form-control" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="zip-code"><?php echo $this->lang->line('zip_code'); ?></label>
|
|
|
|
<input type="text" id="zip-code" class="form-control" />
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="notes"><?php echo $this->lang->line('notes'); ?></label>
|
|
|
|
<textarea id="notes" rows="4" class="form-control"></textarea>
|
|
|
|
</div>
|
2013-07-15 17:27:19 +03:00
|
|
|
|
2013-12-19 18:28:19 +02:00
|
|
|
<center><em id="form-message" class="text-error">
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('fields_are_required'); ?></em></center>
|
2013-07-15 17:27:19 +03:00
|
|
|
</div>
|
|
|
|
|
2015-07-25 12:55:58 +03:00
|
|
|
<div class="col-md-5">
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('appointments'); ?></h2>
|
2013-07-15 17:27:19 +03:00
|
|
|
<div id="customer-appointments"></div>
|
|
|
|
<div id="appointment-details"></div>
|
|
|
|
</div>
|
2013-07-05 11:39:52 +03:00
|
|
|
</div>
|
|
|
|
</div>
|