2017-11-14 16:01:49 +03:00
|
|
|
<script src="<?= asset_url('assets/ext/jquery-ui/jquery-ui-timepicker-addon.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/backend_customers_helper.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/backend_customers.js') ?>"></script>
|
2017-09-05 15:58:34 +03:00
|
|
|
<script>
|
2015-10-05 01:31:06 +03:00
|
|
|
var GlobalVariables = {
|
2017-09-23 04:42:14 +03:00
|
|
|
csrfToken : <?= json_encode($this->security->get_csrf_hash()) ?>,
|
|
|
|
availableProviders : <?= json_encode($available_providers) ?>,
|
|
|
|
availableServices : <?= json_encode($available_services) ?>,
|
2018-07-29 16:59:18 +03:00
|
|
|
secretaryProviders : <?= json_encode($secretary_providers) ?>,
|
2017-09-23 04:42:14 +03:00
|
|
|
dateFormat : <?= json_encode($date_format) ?>,
|
2018-03-06 14:20:47 +03:00
|
|
|
timeFormat : <?= json_encode($time_format) ?>,
|
2017-09-23 04:42:14 +03:00
|
|
|
baseUrl : <?= json_encode($base_url) ?>,
|
|
|
|
customers : <?= json_encode($customers) ?>,
|
|
|
|
user : {
|
|
|
|
id : <?= $user_id ?>,
|
|
|
|
email : <?= json_encode($user_email) ?>,
|
|
|
|
role_slug : <?= json_encode($role_slug) ?>,
|
|
|
|
privileges : <?= json_encode($privileges) ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
BackendCustomers.initialize(true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2016-05-20 10:08:41 +03:00
|
|
|
<div id="customers-page" class="container-fluid backend-page">
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="row">
|
2016-07-14 21:52:50 +03:00
|
|
|
<div id="filter-customers" class="filter-records column col-xs-12 col-sm-5">
|
2017-09-23 02:27:07 +03:00
|
|
|
<form>
|
2017-10-31 13:52:25 +03:00
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="key form-control">
|
2017-09-23 02:27:07 +03:00
|
|
|
|
2018-01-02 15:32:09 +03:00
|
|
|
<div class="input-group-addon">
|
2017-10-31 13:52:25 +03:00
|
|
|
<div>
|
2018-01-02 15:32:09 +03:00
|
|
|
<button class="filter btn btn-default" type="submit" title="<?= lang('filter') ?>">
|
2017-10-31 13:52:25 +03:00
|
|
|
<span class="glyphicon glyphicon-search"></span>
|
|
|
|
</button>
|
2018-01-02 15:32:09 +03:00
|
|
|
<button class="clear btn btn-default" type="button" title="<?= lang('clear') ?>">
|
2017-10-31 13:52:25 +03:00
|
|
|
<span class="glyphicon glyphicon-repeat"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-01-02 15:32:09 +03:00
|
|
|
</div>
|
2015-11-28 12:19:44 +02:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</form>
|
|
|
|
|
2017-09-14 16:18:20 +03:00
|
|
|
<h3><?= lang('customers') ?></h3>
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="results"></div>
|
|
|
|
</div>
|
|
|
|
|
2016-07-14 21:52:50 +03:00
|
|
|
<div class="record-details col-xs-12 col-sm-7">
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div id="add-edit-delete-group" class="btn-group">
|
2017-09-23 02:27:07 +03:00
|
|
|
<?php if ($privileges[PRIV_CUSTOMERS]['add'] === TRUE): ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
<button id="add-customer" class="btn btn-primary">
|
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('add') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2017-09-23 02:27:07 +03:00
|
|
|
<?php endif ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-23 02:27:07 +03:00
|
|
|
<?php if ($privileges[PRIV_CUSTOMERS]['edit'] === TRUE): ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
<button id="edit-customer" class="btn btn-default" disabled="disabled">
|
|
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('edit') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2017-09-23 02:27:07 +03:00
|
|
|
<?php endif ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-23 02:27:07 +03:00
|
|
|
<?php if ($privileges[PRIV_CUSTOMERS]['delete'] === TRUE): ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
<button id="delete-customer" class="btn btn-default" disabled="disabled">
|
|
|
|
<span class="glyphicon glyphicon-remove"></span>
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('delete') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2017-09-23 02:27:07 +03:00
|
|
|
<?php endif ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="save-cancel-group" class="btn-group" style="display:none;">
|
|
|
|
<button id="save-customer" class="btn btn-primary">
|
|
|
|
<span class="glyphicon glyphicon-ok"></span>
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('save') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
|
|
|
<button id="cancel-customer" class="btn btn-default">
|
|
|
|
<i class="glyphicon glyphicon-ban-circle"></i>
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('cancel') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-23 02:27:07 +03:00
|
|
|
<input id="customer-id" type="hidden">
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2016-07-14 21:25:05 +03:00
|
|
|
<div class="row">
|
2017-09-23 02:27:07 +03:00
|
|
|
<div class="col-xs-12 col-sm-6" style="margin-left: 0;">
|
2017-09-14 16:18:20 +03:00
|
|
|
<h3><?= lang('details') ?></h3>
|
2017-09-23 02:27:07 +03:00
|
|
|
|
2016-07-14 21:25:05 +03:00
|
|
|
<div id="form-message" class="alert" style="display:none;"></div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="first-name"><?= lang('first_name') ?> *</label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="first-name" class="form-control required">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="last-name"><?= lang('last_name') ?> *</label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="last-name" class="form-control required">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="email"><?= lang('email') ?> *</label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="email" class="form-control required">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2019-10-18 05:37:52 +03:00
|
|
|
<label class="control-label" for="phone-number"><?= lang('phone_number') ?>
|
|
|
|
<?php echo ('1' === $require_phone_number) ? '*' : ''; ?></label>
|
|
|
|
<input id="phone-number" class="form-control
|
|
|
|
<?php echo ('1' === $require_phone_number) ? 'required' : ''; ?>">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="address"><?= lang('address') ?></label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="address" class="form-control">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="city"><?= lang('city') ?></label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="city" class="form-control">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="zip-code"><?= lang('zip_code') ?></label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="zip-code" class="form-control">
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2020-03-29 15:10:49 +03:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="timezone"><?= lang('timezone') ?></label>
|
|
|
|
<?= render_timezone_dropdown('id="timezone" class="form-control"') ?>
|
|
|
|
</div>
|
|
|
|
|
2016-07-14 21:25:05 +03:00
|
|
|
<div class="form-group">
|
2017-11-14 15:52:59 +03:00
|
|
|
<label class="control-label" for="notes"><?= lang('notes') ?></label>
|
2016-07-14 21:25:05 +03:00
|
|
|
<textarea id="notes" rows="4" class="form-control"></textarea>
|
|
|
|
</div>
|
|
|
|
|
2017-09-23 02:27:07 +03:00
|
|
|
<p class="text-center">
|
|
|
|
<em id="form-message" class="text-danger"><?= lang('fields_are_required') ?></em>
|
|
|
|
</p>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
|
2017-09-23 02:27:07 +03:00
|
|
|
<div class="col-xs-12 col-sm-6">
|
2017-09-14 16:18:20 +03:00
|
|
|
<h3><?= lang('appointments') ?></h3>
|
2017-09-23 02:27:07 +03:00
|
|
|
<div id="customer-appointments" class="well"></div>
|
|
|
|
<div id="appointment-details" class="well hidden"></div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|