forked from mirrors/easyappointments
Replace direct use of variables inside views with the new "vars" helper method.
This commit is contained in:
parent
8dad2d9624
commit
9f08ce329e
38 changed files with 169 additions and 475 deletions
|
@ -153,3 +153,31 @@ if ( ! function_exists('html_vars'))
|
|||
return $value ?? $default;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists('vars'))
|
||||
{
|
||||
/**
|
||||
* Get / set the specified HTML & JS config value.
|
||||
*
|
||||
* If an array is passed as the key, we will assume you want to set an array of values.
|
||||
*
|
||||
* Example "Get":
|
||||
*
|
||||
* $version = vars('version', '1.0.0');
|
||||
*
|
||||
* Example "Set":
|
||||
*
|
||||
* vars(['version' => '1.0.0']);
|
||||
*
|
||||
* @param array|string $key Configuration key.
|
||||
* @param mixed $default Default value in case the requested config has no value.
|
||||
*
|
||||
* @return mixed|NULL Returns the requested value or NULL if you assign a new configuration value.
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
function vars($key = NULL, $default = NULL)
|
||||
{
|
||||
return html_vars($key) ?? script_vars($key) ?? $default;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $available_services
|
||||
* @var array $timezones
|
||||
* @var array $require_first_name
|
||||
* @var array $require_last_name
|
||||
* @var array $require_email
|
||||
* @var array $require_phone_number
|
||||
* @var array $require_address
|
||||
* @var array $require_city
|
||||
* @var array $require_zip_code
|
||||
*/
|
||||
?>
|
||||
<div id="appointments-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
@ -40,7 +27,7 @@
|
|||
// Group services by category, only if there is at least one service
|
||||
// with a parent category.
|
||||
$has_category = FALSE;
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
if ( ! empty($service['category_id']))
|
||||
{
|
||||
|
@ -53,7 +40,7 @@
|
|||
{
|
||||
$grouped_services = [];
|
||||
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
if ( ! empty($service['category_id']))
|
||||
{
|
||||
|
@ -69,7 +56,7 @@
|
|||
// We need the uncategorized services at the end of the list so we will use
|
||||
// another iteration only for the uncategorized services.
|
||||
$grouped_services['uncategorized'] = [];
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
if ($service['category_id'] == NULL)
|
||||
{
|
||||
|
@ -99,7 +86,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
echo '<option value="' . $service['id'] . '">'
|
||||
. $service['name'] . '</option>';
|
||||
|
@ -155,7 +142,7 @@
|
|||
<li>
|
||||
<?= lang('current_user') ?>:
|
||||
<span>
|
||||
<?= $timezones[session('timezone', 'UTC')] ?>
|
||||
<?= vars('timezones')[session('timezone', 'UTC')] ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -194,96 +181,96 @@
|
|||
<div class="mb-3">
|
||||
<label for="first-name" class="form-label">
|
||||
<?= lang('first_name') ?>
|
||||
<?php if ($require_first_name): ?>
|
||||
<?php if (vars('require_first_name')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="first-name"
|
||||
class="<?= $require_first_name ? 'required' : '' ?> form-control"
|
||||
class="<?= vars('require_first_name') ? 'required' : '' ?> form-control"
|
||||
maxlength="100"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="last-name" class="form-label">
|
||||
<?= lang('last_name') ?>
|
||||
<?php if ($require_last_name): ?>
|
||||
<?php if (vars('require_last_name')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="last-name"
|
||||
class="<?= $require_last_name ? 'required' : '' ?> form-control"
|
||||
class="<?= vars('require_last_name') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
<?= lang('email') ?>
|
||||
<?php if ($require_email): ?>
|
||||
<?php if (vars('require_email')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="email"
|
||||
class="<?= $require_email ? 'required' : '' ?> form-control"
|
||||
class="<?= vars('require_email') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="phone-number" class="form-label">
|
||||
<?= lang('phone_number') ?>
|
||||
<?php if ($require_phone_number): ?>
|
||||
<?php if (vars('require_phone_number')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="phone-number" maxlength="60"
|
||||
class="<?= $require_phone_number ? 'required' : '' ?> form-control"/>
|
||||
class="<?= vars('require_phone_number') ? 'required' : '' ?> form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">
|
||||
<?= lang('address') ?>
|
||||
<?php if ($require_address): ?>
|
||||
<?php if (vars('require_address')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="address"
|
||||
class="<?= $require_address ? 'required' : '' ?> form-control"
|
||||
class="<?= vars('require_address') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="city" class="form-label">
|
||||
<?= lang('city') ?>
|
||||
<?php if ($require_city): ?>
|
||||
<?php if (vars('require_city')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="city"
|
||||
class="<?= $require_city ? 'required' : '' ?> form-control"
|
||||
class="<?= vars('require_city') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="zip-code" class="form-label">
|
||||
<?= lang('zip_code') ?>
|
||||
<?php if ($require_zip_code): ?>
|
||||
<?php if (vars('require_zip_cod')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="zip-code"
|
||||
class="<?= $require_zip_code ? 'required' : '' ?> form-control"
|
||||
class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="customer-notes" class="form-label">
|
||||
<?= lang('notes') ?>
|
||||
<?php if ($require_zip_code): ?>
|
||||
<?php if (vars('require_zip_code')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<textarea id="customer-notes" rows="2"
|
||||
class="<?= $require_zip_code ? 'required' : '' ?> form-control"></textarea>
|
||||
class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $user_display_name
|
||||
*/
|
||||
?>
|
||||
<div id="footer" class="d-lg-flex justify-content-lg-start align-items-lg-center p-2 text-center text-lg-left">
|
||||
<div class="mb-3 me-lg-5 mb-lg-0">
|
||||
<img class="me-1" src="<?= base_url('assets/img/logo-16x16.png') ?>" alt="Easy!Appointments Logo">
|
||||
|
@ -42,7 +37,7 @@
|
|||
|
||||
<div class="ms-lg-auto">
|
||||
<strong id="footer-user-display-name">
|
||||
<?= lang('hello') . ', ' . $user_display_name ?>!
|
||||
<?= lang('hello') . ', ' . vars('user_display_name') ?>!
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $privileges
|
||||
* @var string $active_menu
|
||||
*/
|
||||
?>
|
||||
|
||||
<nav id="header" class="navbar navbar-expand-md navbar-dark">
|
||||
<div id="header-logo" class="navbar-brand">
|
||||
<img src="<?= base_url('assets/img/logo.png') ?>" alt="logo">
|
||||
|
@ -20,7 +13,7 @@
|
|||
<div id="header-menu" class="collapse navbar-collapse flex-row-reverse px-2">
|
||||
<ul class="navbar-nav">
|
||||
<?php $hidden = can('view', PRIV_APPOINTMENTS) ? '' : 'd-none' ?>
|
||||
<?php $active = $active_menu == PRIV_APPOINTMENTS ? 'active' : '' ?>
|
||||
<?php $active = vars('active_menu') == PRIV_APPOINTMENTS ? 'active' : '' ?>
|
||||
<li class="nav-item <?= $active . $hidden ?>">
|
||||
<a href="<?= site_url('calendar') ?>" class="nav-link"
|
||||
data-tippy-content="<?= lang('manage_appointment_record_hint') ?>">
|
||||
|
@ -30,7 +23,7 @@
|
|||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_CUSTOMERS) ? '' : 'd-none' ?>
|
||||
<?php $active = $active_menu == PRIV_CUSTOMERS ? 'active' : '' ?>
|
||||
<?php $active = vars('active_menu') == PRIV_CUSTOMERS ? 'active' : '' ?>
|
||||
<li class="nav-item <?= $active . $hidden ?>">
|
||||
<a href="<?= site_url('customers') ?>" class="nav-link"
|
||||
data-tippy-content="<?= lang('manage_customers_hint') ?>">
|
||||
|
@ -40,7 +33,7 @@
|
|||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_SERVICES) ? '' : 'd-none' ?>
|
||||
<?php $active = $active_menu == PRIV_SERVICES ? 'active' : '' ?>
|
||||
<?php $active = vars('active_menu') == PRIV_SERVICES ? 'active' : '' ?>
|
||||
<li class="nav-item dropdown <?= $active . $hidden ?>">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown"
|
||||
data-tippy-content="<?= lang('manage_services_hint') ?>">
|
||||
|
@ -58,7 +51,7 @@
|
|||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_USERS) ? '' : 'd-none' ?>
|
||||
<?php $active = $active_menu == PRIV_USERS ? 'active' : '' ?>
|
||||
<?php $active = vars('active_menu') == PRIV_USERS ? 'active' : '' ?>
|
||||
<li class="nav-item dropdown <?= $active . $hidden ?>">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown"
|
||||
data-tippy-content="<?= lang('manage_users_hint') ?>">
|
||||
|
@ -79,7 +72,7 @@
|
|||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_SYSTEM_SETTINGS) || can('view', PRIV_USER_SETTINGS) ? '' : 'd-none' ?>
|
||||
<?php $active = $active_menu == PRIV_SYSTEM_SETTINGS ? 'active' : '' ?>
|
||||
<?php $active = vars('active_menu') == PRIV_SYSTEM_SETTINGS ? 'active' : '' ?>
|
||||
<li class="nav-item dropdown <?= $active . $hidden ?>">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown"
|
||||
data-tippy-content="<?= lang('settings_hint') ?>">
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* @var bool $manage_mode
|
||||
* @var array $appointment_data
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ($manage_mode): ?>
|
||||
<?php if (vars('manage_mode')): ?>
|
||||
<div id="cancel-appointment-frame" class="row booking-header-bar">
|
||||
<div class="col-12 col-md-10">
|
||||
<small><?= lang('cancel_appointment_hint') ?></small>
|
||||
</div>
|
||||
<div class="col-12 col-md-2">
|
||||
<form id="cancel-appointment-form" method="post"
|
||||
action="<?= site_url('booking_cancellation/of/' . $appointment_data['hash']) ?>">
|
||||
action="<?= site_url('booking_cancellation/of/' . vars('appointment_data')['hash']) ?>">
|
||||
|
||||
<input type="hidden" name="csrfToken" value="<?= $this->security->get_csrf_hash() ?>"/>
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @property bool $manage_mode
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-4" class="wizard-frame" style="display:none;">
|
||||
<div class="frame-container">
|
||||
<h2 class="frame-title"><?= lang('appointment_confirmation') ?></h2>
|
||||
|
@ -37,7 +31,7 @@
|
|||
<form id="book-appointment-form" style="display:inline-block" method="post">
|
||||
<button id="book-appointment-submit" type="button" class="btn btn-success">
|
||||
<i class="fas fa-check-square me-2"></i>
|
||||
<?= ! $manage_mode ? lang('confirm') : lang('update') ?>
|
||||
<?= ! vars('manage_mode') ? lang('confirm') : lang('update') ?>
|
||||
</button>
|
||||
<input type="hidden" name="csrfToken"/>
|
||||
<input type="hidden" name="post_data"/>
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $company_name
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="header">
|
||||
<span id="company-name"><?= $company_name ?></span>
|
||||
<span id="company-name"><?= vars('company_name') ?></span>
|
||||
|
||||
<div id="steps">
|
||||
<div id="step-1" class="book-step active-step"
|
||||
|
|
|
@ -1,26 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $display_first_name
|
||||
* @var string $require_first_name
|
||||
* @var string $display_last_name
|
||||
* @var string $require_last_name
|
||||
* @var string $display_email
|
||||
* @var string $require_email
|
||||
* @var string $display_phone_number
|
||||
* @var string $require_phone_number
|
||||
* @var string $display_address
|
||||
* @var string $require_address
|
||||
* @var string $display_city
|
||||
* @var string $require_city
|
||||
* @var string $display_zip_code
|
||||
* @var string $require_zip_code
|
||||
* @var string $display_notes
|
||||
* @var string $require_notes
|
||||
* @var string $display_terms_and_conditions
|
||||
* @var string $display_privacy_policy
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-3" class="wizard-frame" style="display:none;">
|
||||
<div class="frame-container">
|
||||
|
||||
|
@ -28,109 +5,109 @@
|
|||
|
||||
<div class="row frame-content">
|
||||
<div class="col-12 col-md-6">
|
||||
<?php if ($display_first_name): ?>
|
||||
<?php if (vars('display_first_name')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="first-name" class="form-label">
|
||||
<?= lang('first_name') ?>
|
||||
<?php if ($require_first_name): ?>
|
||||
<?php if (vars('require_first_name')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="first-name"
|
||||
class="<?= $require_first_name ? 'required' : '' ?> form-control" maxlength="100"/>
|
||||
class="<?= vars('require_first_name') ? 'required' : '' ?> form-control" maxlength="100"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($display_last_name): ?>
|
||||
<?php if (vars('display_last_name')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="last-name" class="form-label">
|
||||
<?= lang('last_name') ?>
|
||||
<?php if ($require_last_name): ?>
|
||||
<?php if (vars('require_last_name')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="last-name"
|
||||
class="<?= $require_last_name ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
class="<?= vars('require_last_name') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($display_email): ?>
|
||||
<?php if (vars('display_email')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
<?= lang('email') ?>
|
||||
<?php if ($require_email): ?>
|
||||
<?php if (vars('require_email')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="email"
|
||||
class="<?= $require_email ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
class="<?= vars('require_email') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($display_phone_number): ?>
|
||||
<?php if (vars('display_phone_number')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="phone-number" class="form-label">
|
||||
<?= lang('phone_number') ?>
|
||||
<?php if ($require_phone_number): ?>
|
||||
<?php if (vars('require_phone_number')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="phone-number" maxlength="60"
|
||||
class="<?= $require_phone_number ? 'required' : '' ?> form-control"/>
|
||||
class="<?= vars('require_phone_number') ? 'required' : '' ?> form-control"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6">
|
||||
<?php if ($display_address) : ?>
|
||||
<?php if (vars('display_address')) : ?>
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">
|
||||
<?= lang('address') ?>
|
||||
<?php if ($require_address): ?>
|
||||
<?php if (vars('require_address')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="address" class="<?= $require_address ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
<input type="text" id="address" class="<?= vars('require_address') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($display_city): ?>
|
||||
<?php if (vars('display_city')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="city" class="form-label">
|
||||
<?= lang('city') ?>
|
||||
<?php if ($require_city): ?>
|
||||
<?php if (vars('require_city')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="city" class="<?= $require_city ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
<input type="text" id="city" class="<?= vars('require_city') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($display_zip_code): ?>
|
||||
<?php if (vars('display_zip_code')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="zip-code" class="form-label">
|
||||
<?= lang('zip_code') ?>
|
||||
<?php if ($require_zip_code): ?>
|
||||
<?php if (vars('require_zip_code')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="zip-code" class="<?= $require_zip_code ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
<input type="text" id="zip-code" class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($display_notes): ?>
|
||||
<?php if (vars('display_notes')): ?>
|
||||
<div class="mb-3">
|
||||
<label for="notes" class="form-label">
|
||||
<?= lang('notes') ?>
|
||||
<?php if ($require_notes): ?>
|
||||
<?php if (vars('require_notes')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<textarea id="notes" maxlength="500" class="<?= $require_notes ? 'required' : '' ?> form-control" rows="1"></textarea>
|
||||
<textarea id="notes" maxlength="500" class="<?= vars('require_notes') ? 'required' : '' ?> form-control" rows="1"></textarea>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($display_terms_and_conditions): ?>
|
||||
<?php if (vars('display_terms_and_conditions')): ?>
|
||||
<div class="form-check mb-3">
|
||||
<input type="checkbox" class="required form-check-input" id="accept-to-terms-and-conditions">
|
||||
<label class="form-check-label" for="accept-to-terms-and-conditions">
|
||||
|
@ -144,7 +121,7 @@
|
|||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($display_privacy_policy): ?>
|
||||
<?php if (vars('display_privacy_policy')): ?>
|
||||
<div class="form-check mb-3">
|
||||
<input type="checkbox" class="required form-check-input" id="accept-to-privacy-policy">
|
||||
<label class="form-check-label" for="accept-to-privacy-policy">
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $grouped_timezones
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-2" class="wizard-frame" style="display:none;">
|
||||
<div class="frame-container">
|
||||
|
||||
|
@ -18,7 +12,7 @@
|
|||
<div id="select-time">
|
||||
<div class="mb-3">
|
||||
<label for="select-timezone"><?= lang('timezone') ?></label>
|
||||
<?php component('timezone_dropdown','id="select-timezone" class="form-control" value="UTC"', ['timezones' => $grouped_timezones]) ?>
|
||||
<?php component('timezone_dropdown','id="select-timezone" class="form-control" value="UTC"', ['timezones' => vars('grouped_timezones')]) ?>
|
||||
</div>
|
||||
|
||||
<div id="available-hours"></div>
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $available_services
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-1" class="wizard-frame">
|
||||
<div class="frame-container">
|
||||
<h2 class="frame-title"><?= lang('service_and_provider') ?></h2>
|
||||
|
@ -19,7 +13,7 @@
|
|||
<?php
|
||||
// Group services by category, only if there is at least one service with a parent category.
|
||||
$has_category = FALSE;
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
if ( ! empty($service['category_id']))
|
||||
{
|
||||
|
@ -32,7 +26,7 @@
|
|||
{
|
||||
$grouped_services = [];
|
||||
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
if ( ! empty($service['category_id']))
|
||||
{
|
||||
|
@ -48,7 +42,7 @@
|
|||
// We need the uncategorized services at the end of the list, so we will use another
|
||||
// iteration only for the uncategorized services.
|
||||
$grouped_services['uncategorized'] = [];
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
if ($service['category_id'] == NULL)
|
||||
{
|
||||
|
@ -76,7 +70,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
foreach ($available_services as $service)
|
||||
foreach (vars('available_services') as $service)
|
||||
{
|
||||
echo '<option value="' . $service['id'] . '">' . $service['name'] . '</option>';
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $cookie_notice_content
|
||||
*/
|
||||
?>
|
||||
<div id="cookie-notice-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@ -11,7 +6,7 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?= $cookie_notice_content ?></p>
|
||||
<p><?= vars('cookie_notice_content') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $attributes
|
||||
*/
|
||||
?>
|
||||
<script <?= $attributes ?>>
|
||||
<script <?= vars('attributes') ?>>
|
||||
window.lang = (function () {
|
||||
const lang = <?= json_encode($this->lang->language) ?>;
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $attributes
|
||||
*/
|
||||
?>
|
||||
<script <?= $attributes ?>>
|
||||
<script <?= vars('attributes') ?>>
|
||||
window.vars = (function () {
|
||||
const vars = <?= json_encode(script_vars()) ?>;
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $privacy_policy_content
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="privacy-policy-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@ -13,7 +7,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?= $privacy_policy_content ?></p>
|
||||
<p><?= vars('privacy_policy_content') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $terms_and_conditions_content
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="terms-and-conditions-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@ -12,7 +6,7 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?= $terms_and_conditions_content ?></p>
|
||||
<p><?= vars('terms_and_conditions_content') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $attributes
|
||||
* @var array $timezones
|
||||
*/
|
||||
?>
|
||||
|
||||
<select <?= $attributes ?>>
|
||||
<?php foreach ($timezones as $continent => $entries): ?>
|
||||
<select <?= vars('attributes') ?>>
|
||||
<?php foreach (vars('timezones') as $continent => $entries): ?>
|
||||
<optgroup label="<?= $continent ?>">
|
||||
<?php foreach ($entries as $value => $name): ?>
|
||||
<option value="<?= $value ?>"><?= $name ?></option>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $timezones
|
||||
* @var string $timezone
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="unavailabilities-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@ -55,7 +48,7 @@
|
|||
<li>
|
||||
<?= lang('current_user') ?>:
|
||||
<span>
|
||||
<?= $timezones[$timezone] ?>
|
||||
<?= vars('timezones')[vars('timezone')] ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $company_name
|
||||
* @var string $email_title
|
||||
* @var string $email_message
|
||||
* @var string $company_link
|
||||
*/
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>New Password | Easy!Appointments</title>
|
||||
|
@ -14,13 +6,13 @@
|
|||
<div class="email-container" style="width: 650px; border: 1px solid #eee;">
|
||||
<div id="header" style="background-color: #429a82; height: 45px; padding: 10px 15px;">
|
||||
<strong id="logo" style="color: white; font-size: 20px; margin-top: 10px; display: inline-block">
|
||||
<?= $company_name ?>
|
||||
<?= vars('company_name') ?>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div id="content" style="padding: 10px 15px;">
|
||||
<h2><?= $email_title ?></h2>
|
||||
<p><?= $email_message ?></p>
|
||||
<h2><?= vars('email_title') ?></h2>
|
||||
<p><?= vars('email_message') ?></p>
|
||||
</div>
|
||||
|
||||
<div id="footer" style="padding: 10px; text-align: center; margin-top: 10px;
|
||||
|
@ -28,7 +20,7 @@
|
|||
Powered by
|
||||
<a href="https://easyappointments.org" style="text-decoration: none;">Easy!Appointments</a>
|
||||
|
|
||||
<a href="<?= $company_link ?>" style="text-decoration: none;"><?= $company_name ?></a>
|
||||
<a href="<?= vars('company_link') ?>" style="text-decoration: none;"><?= vars('company_name') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $company_name
|
||||
* @var string $appointment_service
|
||||
* @var string $appointment_provider
|
||||
* @var string $appointment_duration
|
||||
* @var string $appointment_timezone
|
||||
* @var string $customer_name
|
||||
* @var string $customer_email
|
||||
* @var string $customer_phone
|
||||
* @var string $customer_address
|
||||
* @var string $reason
|
||||
* @var string $company_link
|
||||
*/
|
||||
?>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><?= lang('appointment_cancelled_title') ?> | Easy!Appointments</title>
|
||||
|
@ -22,7 +6,7 @@
|
|||
<div class="email-container" style="width: 650px; border: 1px solid #eee;">
|
||||
<div id="header" style="background-color: #429a82; height: 45px; padding: 10px 15px;">
|
||||
<strong id="logo" style="color: white; font-size: 20px; margin-top: 10px; display: inline-block">
|
||||
<?= $company_name ?>
|
||||
<?= vars('company_name') ?>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
|
@ -34,23 +18,23 @@
|
|||
<table id="appointment-details">
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('service') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_service ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_service') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('provider') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_provider ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_provider') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('start') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_date ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_date') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('duration') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_duration ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_duration') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('timezone') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_timezone ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_timezone') ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -58,24 +42,24 @@
|
|||
<table id="customer-details">
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('name') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_name ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_name') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('email') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_email ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_email') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('phone_number') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_phone ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_phone') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('address') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_address ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_address') ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><?= lang('reason') ?></h2>
|
||||
<p><?= $reason ?></p>
|
||||
<p><?= vars('reason') ?></p>
|
||||
</div>
|
||||
|
||||
<div id="footer" style="padding: 10px; text-align: center; margin-top: 10px;
|
||||
|
@ -83,7 +67,7 @@
|
|||
Powered by
|
||||
<a href="https://easyappointments.org" style="text-decoration: none;">Easy!Appointments</a>
|
||||
|
|
||||
<a href="<?= $company_link ?>" style="text-decoration: none;"><?= $company_name ?></a>
|
||||
<a href="<?= vars('company_link') ?>" style="text-decoration: none;"><?= vars('company_name') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -25,35 +25,35 @@
|
|||
<div class="email-container" style="width: 650px; border: 1px solid #eee;">
|
||||
<div id="header" style="background-color: #429a82; height: 45px; padding: 10px 15px;">
|
||||
<strong id="logo" style="color: white; font-size: 20px; margin-top: 10px; display: inline-block">
|
||||
<?= $company_name ?>
|
||||
<?= vars('company_name') ?>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div id="content" style="padding: 10px 15px;">
|
||||
<h2><?= $email_title ?></h2>
|
||||
<p><?= $email_message ?></p>
|
||||
<h2><?= vars('email_title') ?></h2>
|
||||
<p><?= vars('email_message') ?></p>
|
||||
|
||||
<h2><?= lang('appointment_details_title') ?></h2>
|
||||
<table id="appointment-details">
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('service') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_service ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_service') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('provider') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_provider ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_provider') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('start') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_start_date ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_start_date') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('end') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_end_date ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_end_date') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('timezone') ?></td>
|
||||
<td style="padding: 3px;"><?= $appointment_timezone ?></td>
|
||||
<td style="padding: 3px;"><?= vars('appointment_timezone') ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -61,24 +61,24 @@
|
|||
<table id="customer-details">
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('name') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_name ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_name') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('email') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_email ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_email') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('phone_number') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_phone ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_phone') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="padding: 3px;font-weight: bold;"><?= lang('address') ?></td>
|
||||
<td style="padding: 3px;"><?= $customer_address ?></td>
|
||||
<td style="padding: 3px;"><?= vars('customer_address') ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><?= lang('appointment_link_title') ?></h2>
|
||||
<a href="<?= $appointment_link ?>" style="width: 600px;"><?= $appointment_link ?></a>
|
||||
<a href="<?= vars('appointment_link') ?>" style="width: 600px;"><?= vars('appointment_link') ?></a>
|
||||
</div>
|
||||
|
||||
<div id="footer" style="padding: 10px; text-align: center; margin-top: 10px;
|
||||
|
@ -86,7 +86,7 @@
|
|||
Powered by
|
||||
<a href="https://easyappointments.org" style="text-decoration: none;">Easy!Appointments</a>
|
||||
|
|
||||
<a href="<?= $company_link ?>" style="text-decoration: none;"><?= $company_name ?></a>
|
||||
<a href="<?= vars('company_link') ?>" style="text-decoration: none;"><?= vars('company_name') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $base_url
|
||||
* @var string $dest_url
|
||||
*/
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $page_title
|
||||
*/
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
|
@ -1,23 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $company_name
|
||||
* @var string $customer_token
|
||||
* @var string $date_format
|
||||
* @var string $time_format
|
||||
* @var string $first_weekday
|
||||
* @var bool $manage_mode
|
||||
* @var array $appointment_data
|
||||
* @var array $provider_data
|
||||
* @var array $customer_data
|
||||
* @var array $available_services
|
||||
* @var array $available_providers
|
||||
* @var string $display_any_provider
|
||||
* @var string $display_terms_and_conditions
|
||||
* @var string $display_privacy_policy
|
||||
* @var string $display_cookie_notice
|
||||
*/
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -28,7 +8,7 @@
|
|||
|
||||
<?php slot('meta') ?>
|
||||
|
||||
<title><?= lang('page_title') . ' ' . $company_name ?> | Easy!Appointments</title>
|
||||
<title><?= lang('page_title') . ' ' . vars('company_name') ?> | Easy!Appointments</title>
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
|
||||
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
|
||||
|
@ -55,15 +35,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($display_cookie_notice === '1'): ?>
|
||||
<?php if (vars('display_cookie_notice') === '1'): ?>
|
||||
<?php component('cookie_notice_modal') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($display_terms_and_conditions === '1'): ?>
|
||||
<?php if (vars('display_terms_and_conditions') === '1'): ?>
|
||||
<?php component('terms_and_conditions_modal') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($display_privacy_policy === '1'): ?>
|
||||
<?php if (vars('display_privacy_policy') === '1'): ?>
|
||||
<?php component('privacy_policy_modal') ?>
|
||||
<?php endif ?>
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $page_title
|
||||
*/
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -14,7 +8,7 @@
|
|||
|
||||
<?php slot('meta') ?>
|
||||
|
||||
<title><?= $page_title ?> | Easy!Appointments</title>
|
||||
<title><?= vars('page_title') ?> | Easy!Appointments</title>
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
|
||||
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $timezones
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $company_name
|
||||
* @var string $customer_token
|
||||
* @var string $date_format
|
||||
* @var string $time_format
|
||||
* @var string $first_weekday
|
||||
* @var bool $manage_mode
|
||||
* @var array $appointment_data
|
||||
* @var array $provider_data
|
||||
* @var array $customer_data
|
||||
* @var array $available_services
|
||||
* @var array $available_providers
|
||||
* @var array $show_field
|
||||
* @var bool $require_phone_number
|
||||
* @var string $display_any_provider
|
||||
* @var string $display_terms_and_conditions
|
||||
* @var string $display_privacy_policy
|
||||
* @var string $display_cookie_notice
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/booking_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $company_name
|
||||
* @var array $appointment_data
|
||||
* @var array $provider_data
|
||||
* @var array $customer_data
|
||||
* @var array $service_data
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/message_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $message_title
|
||||
* @var string $message_icon
|
||||
* @var string $message_text
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/message_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,33 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $available_providers
|
||||
* @var array $available_services
|
||||
* @var string $base_url
|
||||
* @var string $date_format
|
||||
* @var string $time_format
|
||||
* @var string $first_weekday
|
||||
* @var array $edit_appointment
|
||||
* @var array $customers
|
||||
* @var array $secretary_providers
|
||||
* @var string $calendar_view
|
||||
* @var string $timezones
|
||||
* @var string $user_id
|
||||
* @var string $user_email
|
||||
* @var string $timezone
|
||||
* @var string $role_slug
|
||||
* @var array $privileges
|
||||
* @var array $available_services
|
||||
* @var array $timezones
|
||||
* @var array $require_first_name
|
||||
* @var array $require_last_name
|
||||
* @var array $require_email
|
||||
* @var array $require_phone_number
|
||||
* @var array $require_address
|
||||
* @var array $require_city
|
||||
* @var array $require_zip_code
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('styles') ?>
|
||||
|
@ -95,14 +65,14 @@
|
|||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
|
||||
<?php if ($calendar_view === 'default'): ?>
|
||||
<?php if (vars('calendar_view') === 'default'): ?>
|
||||
<a class="btn btn-light" href="<?= site_url('calendar?view=table') ?>"
|
||||
data-tippy-content="<?= lang('table') ?>">
|
||||
<i class="fas fa-table"></i>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($calendar_view === 'table'): ?>
|
||||
<?php if (vars('calendar_view') === 'table'): ?>
|
||||
<a class="btn btn-light" href="<?= site_url('calendar?view=default') ?>"
|
||||
data-tippy-content="<?= lang('default') ?>">
|
||||
<i class="fas fa-calendar-alt"></i>
|
||||
|
@ -123,15 +93,15 @@
|
|||
'appointments_modal',
|
||||
'',
|
||||
[
|
||||
'available_services' => $available_services,
|
||||
'timezones' => $timezones,
|
||||
'require_first_name' => $require_first_name,
|
||||
'require_last_name' => $require_last_name,
|
||||
'require_email' => $require_email,
|
||||
'require_phone_number' => $require_phone_number,
|
||||
'require_address' => $require_address,
|
||||
'require_city' => $require_city,
|
||||
'require_zip_code' => $require_zip_code
|
||||
'available_services' => vars('available_services'),
|
||||
'timezones' => vars('timezones'),
|
||||
'require_first_name' => vars('require_first_name'),
|
||||
'require_last_name' => vars('require_last_name'),
|
||||
'require_email' => vars('require_email'),
|
||||
'require_phone_number' => vars('require_phone_number'),
|
||||
'require_address' => vars('require_address'),
|
||||
'require_city' => vars('require_city'),
|
||||
'require_zip_code' => vars('require_zip_code')
|
||||
]
|
||||
)
|
||||
?>
|
||||
|
@ -141,8 +111,8 @@
|
|||
'unavailabilities_modal',
|
||||
'',
|
||||
[
|
||||
'timezones' => $timezones,
|
||||
'timezone' => $timezone
|
||||
'timezones' => vars('timezones'),
|
||||
'timezone' => vars('timezone')
|
||||
]
|
||||
)
|
||||
?>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $timezones
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $timezones
|
||||
* @var array $privileges
|
||||
* @var array $require_first_name
|
||||
* @var array $require_last_name
|
||||
* @var array $require_email
|
||||
* @var array $require_phone_number
|
||||
* @var array $require_address
|
||||
* @var array $require_city
|
||||
* @var array $require_zip_code
|
||||
* @var array $available_languages
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
@ -38,21 +23,21 @@
|
|||
<div class="record-details col-12 col-md-7">
|
||||
<div class="btn-toolbar mb-4">
|
||||
<div id="add-edit-delete-group" class="btn-group">
|
||||
<?php if ($privileges[PRIV_CUSTOMERS]['add'] === TRUE): ?>
|
||||
<?php if (can('add',PRIV_CUSTOMERS)): ?>
|
||||
<button id="add-customer" class="btn btn-primary">
|
||||
<i class="fas fa-plus-square me-2"></i>
|
||||
<?= lang('add') ?>
|
||||
</button>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($privileges[PRIV_CUSTOMERS]['edit'] === TRUE): ?>
|
||||
<?php if (can('edit',PRIV_CUSTOMERS)): ?>
|
||||
<button id="edit-customer" class="btn btn-outline-secondary" disabled="disabled">
|
||||
<i class="fas fa-edit me-2"></i>
|
||||
<?= lang('edit') ?>
|
||||
</button>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($privileges[PRIV_CUSTOMERS]['delete'] === TRUE): ?>
|
||||
<?php if (can('delete',PRIV_CUSTOMERS)): ?>
|
||||
<button id="delete-customer" class="btn btn-outline-secondary" disabled="disabled">
|
||||
<i class="fas fa-trash-alt me-2"></i>
|
||||
<?= lang('delete') ?>
|
||||
|
@ -83,77 +68,77 @@
|
|||
<div class="mb-3">
|
||||
<label for="first-name" class="form-label">
|
||||
<?= lang('first_name') ?>
|
||||
<?php if ($require_first_name): ?>
|
||||
<?php if (vars('require_first_name')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="first-name"
|
||||
class="<?= $require_first_name ? 'required' : '' ?> form-control" maxlength="100"/>
|
||||
class="<?= vars('require_first_name') ? 'required' : '' ?> form-control" maxlength="100"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="last-name" class="form-label">
|
||||
<?= lang('last_name') ?>
|
||||
<?php if ($require_last_name): ?>
|
||||
<?php if (vars('require_last_name')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="last-name"
|
||||
class="<?= $require_last_name ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
class="<?= vars('require_last_name') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
<?= lang('email') ?>
|
||||
<?php if ($require_email): ?>
|
||||
<?php if (vars('require_email')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="email"
|
||||
class="<?= $require_email ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
class="<?= vars('require_email') ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="phone-number" class="form-label">
|
||||
<?= lang('phone_number') ?>
|
||||
<?php if ($require_phone_number): ?>
|
||||
<?php if (vars('require_phone_number')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="phone-number" maxlength="60"
|
||||
class="<?= $require_phone_number ? 'required' : '' ?> form-control"/>
|
||||
class="<?= vars('require_phone_number') ? 'required' : '' ?> form-control"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">
|
||||
<?= lang('address') ?>
|
||||
<?php if ($require_address): ?>
|
||||
<?php if (vars('require_address')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="address" class="<?= $require_address ? 'required' : '' ?> form-control"
|
||||
<input type="text" id="address" class="<?= vars('require_address') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="city" class="form-label">
|
||||
<?= lang('city') ?>
|
||||
<?php if ($require_city): ?>
|
||||
<?php if (vars('require_city')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="city" class="<?= $require_city ? 'required' : '' ?> form-control"
|
||||
<input type="text" id="city" class="<?= vars('require_city') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="zip-code" class="form-label">
|
||||
<?= lang('zip_code') ?>
|
||||
<?php if ($require_zip_code): ?>
|
||||
<?php if (vars('require_zip_code')): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif ?>
|
||||
</label>
|
||||
<input type="text" id="zip-code" class="<?= $require_zip_code ? 'required' : '' ?> form-control"
|
||||
<input type="text" id="zip-code" class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
|
@ -163,7 +148,7 @@
|
|||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<select id="language" class="form-control required">
|
||||
<?php foreach ($available_languages as $available_language): ?>
|
||||
<?php foreach (vars('available_languages') as $available_language): ?>
|
||||
<option value="<?= $available_language ?>">
|
||||
<?= $available_language ?>
|
||||
</option>
|
||||
|
@ -208,6 +193,4 @@
|
|||
<script src="<?= asset_url('assets/js/http/customers_http_client.js') ?>"></script>
|
||||
<script src="<?= asset_url('assets/js/pages/customers.js') ?>"></script>
|
||||
|
||||
</script>
|
||||
|
||||
<?php section('scripts') ?>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $system_settings
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
@ -39,7 +32,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang('cookie_notice_content') ?></label>
|
||||
<label class="form-label" for="cookie-notice-content"><?= lang('cookie_notice_content') ?></label>
|
||||
<textarea id="cookie-notice-content" cols="30" rows="10" class="mb-3"></textarea>
|
||||
</div>
|
||||
|
||||
|
@ -56,7 +49,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang('terms_and_conditions_content') ?></label>
|
||||
<label class="form-label" for="terms-and-conditions-content"><?= lang('terms_and_conditions_content') ?></label>
|
||||
<textarea id="terms-and-conditions-content" cols="30" rows="10"
|
||||
class="mb-3"></textarea>
|
||||
</div>
|
||||
|
@ -72,7 +65,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang('privacy_policy_content') ?></label>
|
||||
<label class="form-label" for="privacy-policy-content"><?= lang('privacy_policy_content') ?></label>
|
||||
<textarea id="privacy-policy-content" cols="30" rows="10" class="mb-3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $base_url
|
||||
* @var string $dest_url
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/account_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $timezones
|
||||
* @var string $services
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $providers
|
||||
* @var string $timezones
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var string $timezones
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/**
|
||||
* @var bool $success
|
||||
* @var string $exception
|
||||
*/
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -28,7 +21,7 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<?php if ($success): ?>
|
||||
<?php if (vars('success')): ?>
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-4">Success!</h1>
|
||||
<p class="lead">
|
||||
|
@ -64,7 +57,7 @@
|
|||
</div>
|
||||
|
||||
<div class="well text-start">
|
||||
Error Message: <?= $exception ?>
|
||||
Error Message: <?= vars('exception') ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue