2023-11-29 12:24:09 +03:00
|
|
|
<?php extend('layouts/backend_layout'); ?>
|
2021-11-15 11:49:08 +03:00
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php section('content'); ?>
|
2021-11-15 11:49:08 +03:00
|
|
|
|
2020-09-03 14:35:58 +03:00
|
|
|
<div class="container-fluid backend-page" id="customers-page">
|
2020-12-08 14:23:37 +03:00
|
|
|
<div class="row" id="customers">
|
2020-08-31 17:02:54 +03:00
|
|
|
<div id="filter-customers" class="filter-records col col-12 col-md-5">
|
2020-05-05 20:35:33 +03:00
|
|
|
<form class="mb-4">
|
2022-01-07 10:47:09 +03:00
|
|
|
<div class="input-group mb-3">
|
2023-10-26 06:14:41 +03:00
|
|
|
<input type="text" class="key form-control" aria-label="keyword">
|
2017-09-23 02:27:07 +03:00
|
|
|
|
2022-01-07 10:47:09 +03:00
|
|
|
<button class="filter btn btn-outline-secondary" type="submit"
|
|
|
|
data-tippy-content="<?= lang('filter') ?>">
|
|
|
|
<i class="fas fa-search"></i>
|
|
|
|
</button>
|
2015-11-28 12:19:44 +02:00
|
|
|
</div>
|
2020-05-05 20:35:33 +03:00
|
|
|
</form>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2022-09-14 13:02:26 +03:00
|
|
|
<h4 class="text-black-50 mb-3 fw-light">
|
|
|
|
<?= lang('customers') ?>
|
|
|
|
</h4>
|
2023-11-29 12:24:09 +03:00
|
|
|
|
2024-05-11 18:50:45 +03:00
|
|
|
<?php slot('after_page_title'); ?>
|
|
|
|
|
2022-09-14 13:02:26 +03:00
|
|
|
<div class="results">
|
|
|
|
<!-- JS -->
|
|
|
|
</div>
|
2020-12-09 15:17:45 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2020-12-09 15:17:45 +03:00
|
|
|
<div class="record-details col-12 col-md-7">
|
2020-05-05 20:35:33 +03:00
|
|
|
<div class="btn-toolbar mb-4">
|
2015-10-05 01:31:06 +03:00
|
|
|
<div id="add-edit-delete-group" class="btn-group">
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php if (
|
|
|
|
can('add', PRIV_CUSTOMERS) &&
|
|
|
|
(!setting('limit_customer_access') || vars('role_slug') === DB_SLUG_ADMIN)
|
|
|
|
): ?>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button id="add-customer" class="btn btn-primary">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-plus-square me-2"></i>
|
2020-12-09 15:17:45 +03:00
|
|
|
<?= lang('add') ?>
|
|
|
|
</button>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2022-05-27 10:27:25 +03:00
|
|
|
<?php if (can('edit', PRIV_CUSTOMERS)): ?>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button id="edit-customer" class="btn btn-outline-secondary" disabled="disabled">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-edit me-2"></i>
|
2020-12-09 15:17:45 +03:00
|
|
|
<?= lang('edit') ?>
|
|
|
|
</button>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2022-05-27 10:27:25 +03:00
|
|
|
<?php if (can('delete', PRIV_CUSTOMERS)): ?>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button id="delete-customer" class="btn btn-outline-secondary" disabled="disabled">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-trash-alt me-2"></i>
|
2020-12-09 15:17:45 +03:00
|
|
|
<?= lang('delete') ?>
|
|
|
|
</button>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
|
2022-01-24 14:55:45 +03:00
|
|
|
<div id="save-cancel-group" style="display:none;">
|
2020-08-31 13:23:10 +03:00
|
|
|
<button id="save-customer" class="btn btn-primary">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-check-square me-2"></i>
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('save') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2022-01-24 14:55:45 +03:00
|
|
|
<button id="cancel-customer" class="btn btn-secondary">
|
2017-09-14 16:18:20 +03:00
|
|
|
<?= lang('cancel') ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
|
|
|
</div>
|
2024-05-11 18:50:45 +03:00
|
|
|
|
|
|
|
<?php slot('after_page_actions'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</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">
|
2020-08-31 17:02:54 +03:00
|
|
|
<div class="col-12 col-md-6" style="margin-left: 0;">
|
2022-09-14 13:02:26 +03:00
|
|
|
<h4 class="text-black-50 mb-3 fw-light">
|
|
|
|
<?= lang('details') ?>
|
|
|
|
</h4>
|
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>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="first-name" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('first_name') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_first_name')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-01-05 10:27:16 +03:00
|
|
|
<input type="text" id="first-name"
|
2022-05-27 10:27:25 +03:00
|
|
|
class="<?= vars('require_first_name') ? 'required' : '' ?> form-control" maxlength="100"
|
|
|
|
disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="last-name" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('last_name') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_last_name')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-01-05 10:27:16 +03:00
|
|
|
<input type="text" id="last-name"
|
2022-05-27 10:27:25 +03:00
|
|
|
class="<?= vars('require_last_name') ? 'required' : '' ?> form-control" maxlength="120"
|
|
|
|
disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="email" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('email') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_email')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-01-05 10:27:16 +03:00
|
|
|
<input type="text" id="email"
|
2022-05-27 10:27:25 +03:00
|
|
|
class="<?= vars('require_email') ? 'required' : '' ?> form-control" maxlength="120"
|
|
|
|
disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="phone-number" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('phone_number') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_phone_number')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2022-01-05 10:27:16 +03:00
|
|
|
</label>
|
|
|
|
<input type="text" id="phone-number" maxlength="60"
|
2022-01-19 11:39:13 +03:00
|
|
|
class="<?= vars('require_phone_number') ? 'required' : '' ?> form-control" disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="address" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('address') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_address')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-05-27 10:27:25 +03:00
|
|
|
<input type="text" id="address"
|
|
|
|
class="<?= vars('require_address') ? 'required' : '' ?> form-control"
|
2022-01-19 11:39:13 +03:00
|
|
|
maxlength="120" disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="city" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('city') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_city')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-01-18 10:45:02 +03:00
|
|
|
<input type="text" id="city" class="<?= vars('require_city') ? 'required' : '' ?> form-control"
|
2022-01-19 11:39:13 +03:00
|
|
|
maxlength="120" disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
2022-01-05 10:27:16 +03:00
|
|
|
<label for="zip-code" class="form-label">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('zip_code') ?>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php if (vars('require_zip_code')): ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-05-27 10:27:25 +03:00
|
|
|
<input type="text" id="zip-code"
|
|
|
|
class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control"
|
2022-01-19 11:39:13 +03:00
|
|
|
maxlength="120" disabled/>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="language">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('language') ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-01-19 11:39:13 +03:00
|
|
|
<select id="language" class="form-control required" disabled>
|
2022-01-18 10:45:02 +03:00
|
|
|
<?php foreach (vars('available_languages') as $available_language): ?>
|
2022-01-06 11:52:27 +03:00
|
|
|
<option value="<?= $available_language ?>">
|
2022-01-19 11:39:13 +03:00
|
|
|
<?= ucfirst($available_language) ?>
|
2022-01-06 11:52:27 +03:00
|
|
|
</option>
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endforeach; ?>
|
2022-01-06 11:52:27 +03:00
|
|
|
</select>
|
2020-06-16 18:01:27 +03:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="timezone">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('timezone') ?>
|
2022-01-19 11:39:13 +03:00
|
|
|
<span class="text-danger" hidden>*</span>
|
2020-09-30 14:32:42 +03:00
|
|
|
</label>
|
2022-01-18 13:04:08 +03:00
|
|
|
<?php component('timezone_dropdown', [
|
2022-01-19 11:39:13 +03:00
|
|
|
'attributes' => 'id="timezone" class="form-control required" disabled',
|
2023-12-22 13:35:41 +03:00
|
|
|
'grouped_timezones' => vars('grouped_timezones'),
|
2023-11-29 12:24:09 +03:00
|
|
|
]); ?>
|
2020-03-29 15:10:49 +03:00
|
|
|
</div>
|
|
|
|
|
2024-05-14 00:36:54 +03:00
|
|
|
<?php if (setting('ldap_is_active')): ?>
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="ldap-dn" class="form-label">
|
|
|
|
<?= lang('ldap_dn') ?>
|
|
|
|
</label>
|
|
|
|
<input type="text" id="ldap-dn" class="form-control" maxlength="100" disabled/>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2023-12-11 11:54:29 +03:00
|
|
|
<?php component('custom_fields', [
|
2023-12-22 13:35:41 +03:00
|
|
|
'disabled' => true,
|
2023-12-11 11:54:29 +03:00
|
|
|
]); ?>
|
2023-11-29 12:24:09 +03:00
|
|
|
|
2021-11-23 11:53:10 +03:00
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="notes">
|
2020-09-30 14:32:42 +03:00
|
|
|
<?= lang('notes') ?>
|
|
|
|
</label>
|
2022-01-19 11:39:13 +03:00
|
|
|
<textarea id="notes" rows="4" class="form-control" disabled></textarea>
|
2016-07-14 21:25:05 +03:00
|
|
|
</div>
|
2024-05-11 18:50:45 +03:00
|
|
|
|
|
|
|
<?php slot('after_primary_fields'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
|
2020-08-31 17:02:54 +03:00
|
|
|
<div class="col-12 col-md-6">
|
2022-09-14 13:02:26 +03:00
|
|
|
<h4 class="text-black-50 mb-3 fw-light">
|
|
|
|
<?= lang('appointments') ?>
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
<div id="customer-appointments" class="card bg-white border"></div>
|
2024-05-11 18:50:45 +03:00
|
|
|
|
|
|
|
<?php slot('after_secondary_fields'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-09 15:17:45 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-15 11:49:08 +03:00
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php end_section('content'); ?>
|
2021-12-13 09:44:01 +03:00
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php section('scripts'); ?>
|
2021-12-13 09:44:01 +03:00
|
|
|
|
2022-01-06 11:52:27 +03:00
|
|
|
<script src="<?= asset_url('assets/js/utils/date.js') ?>"></script>
|
2022-01-07 10:42:28 +03:00
|
|
|
<script src="<?= asset_url('assets/js/utils/message.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/validation.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/url.js') ?>"></script>
|
2022-01-06 11:52:27 +03:00
|
|
|
<script src="<?= asset_url('assets/js/http/customers_http_client.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/pages/customers.js') ?>"></script>
|
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php end_section('scripts'); ?>
|