Corrections in the customers page

This commit is contained in:
Alex Tselegidis 2021-11-25 08:46:01 +01:00
parent bc723c2609
commit 7841535802
2 changed files with 10 additions and 26 deletions

View file

@ -32,7 +32,7 @@
<?php $hidden = ($privileges[PRIV_CUSTOMERS]['view'] == TRUE) ? '' : 'd-none' ?> <?php $hidden = ($privileges[PRIV_CUSTOMERS]['view'] == TRUE) ? '' : 'd-none' ?>
<?php $active = ($active_menu == PRIV_CUSTOMERS) ? 'active' : '' ?> <?php $active = ($active_menu == PRIV_CUSTOMERS) ? 'active' : '' ?>
<li class="nav-item <?= $active . $hidden ?>"> <li class="nav-item <?= $active . $hidden ?>">
<a href="<?= site_url('backend/customers') ?>" class="nav-link" <a href="<?= site_url('customers') ?>" class="nav-link"
data-tippy-content="<?= lang('manage_customers_hint') ?>"> data-tippy-content="<?= lang('manage_customers_hint') ?>">
<i class="fas fa-user-friends me-2"></i> <i class="fas fa-user-friends me-2"></i>
<?= lang('customers') ?> <?= lang('customers') ?>

View file

@ -1,19 +1,7 @@
<?php <?php
/** /**
* @var array $available_providers
* @var array $available_services
* @var array $secretary_providers
* @var string $date_format
* @var string $time_format
* @var string $base_url
* @var array $customers
* @var string $timezones * @var string $timezones
* @var string $user_id
* @var string $user_email
* @var string $timezone
* @var string $role_slug
* @var array $privileges * @var array $privileges
* @var string $require_phone_number
*/ */
?> ?>
@ -27,19 +15,15 @@
<script> <script>
var GlobalVariables = { var GlobalVariables = {
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>, csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
availableProviders: <?= json_encode($available_providers) ?>, baseUrl: <?= json_encode(config('base_url')) ?>,
availableServices: <?= json_encode($available_services) ?>, dateFormat: <?= json_encode(setting('date_format')) ?>,
secretaryProviders: <?= json_encode($secretary_providers) ?>, timeFormat: <?= json_encode(setting('time_format')) ?>,
dateFormat: <?= json_encode($date_format) ?>,
timeFormat: <?= json_encode($time_format) ?>,
baseUrl: <?= json_encode($base_url) ?>,
customers: <?= json_encode($customers) ?>,
timezones: <?= json_encode($timezones) ?>, timezones: <?= json_encode($timezones) ?>,
user: { user: {
id: <?= $user_id ?>, d: <?= session('user_id') ?>,
email: <?= json_encode($user_email) ?>, email: <?= json_encode(session('user_email')) ?>,
timezone: <?= json_encode($timezone) ?>, timezone: <?= json_encode(session('timezone')) ?>,
role_slug: <?= json_encode($role_slug) ?>, role_slug: <?= json_encode(session('role_slug')) ?>,
privileges: <?= json_encode($privileges) ?> privileges: <?= json_encode($privileges) ?>
} }
}; };
@ -147,9 +131,9 @@
<div class="mb-3"> <div class="mb-3">
<label class="form-label" for="phone-number"> <label class="form-label" for="phone-number">
<?= lang('phone_number') ?> <?= lang('phone_number') ?>
<?= $require_phone_number === '1' ? '<span class="text-danger">*</span>' : ''; ?></label> <?= setting('require_phone_number') === '1' ? '<span class="text-danger">*</span>' : '' ?></label>
<input id="phone-number" class="form-control <input id="phone-number" class="form-control
<?= $require_phone_number === '1' ? 'required' : '' ?>"> <?= setting('require_phone_number') === '1' ? 'required' : '' ?>">
</div> </div>
<div class="mb-3"> <div class="mb-3">