This commit is contained in:
22
application/views/components/appointment_status_options.php
Normal file
22
application/views/components/appointment_status_options.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $attributes
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="appointment-status-options" <?= $attributes ?? '' ?>>
|
||||
<ul class="list-group">
|
||||
<!-- JS -->
|
||||
</ul>
|
||||
|
||||
<button type="button" class="btn btn-outline-primary btn-sm add-appointment-status-option">
|
||||
<i class="fas fa-plus-square me-2"></i>
|
||||
<?= lang('add') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<?php section('scripts'); ?>
|
||||
|
||||
<script src="<?= asset_url('assets/js/components/appointment_status_options.js') ?>"></script>
|
||||
|
||||
<?php end_section('scripts'); ?>
|
||||
379
application/views/components/appointments_modal.php
Normal file
379
application/views/components/appointments_modal.php
Normal file
@@ -0,0 +1,379 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var array $available_services
|
||||
* @var array $appointment_status_options
|
||||
* @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
|
||||
* @var array $require_notes
|
||||
*/
|
||||
?>
|
||||
<div id="appointments-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?= lang('edit_appointment_title') ?></h3>
|
||||
<button class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="modal-message alert d-none"></div>
|
||||
|
||||
<form>
|
||||
<fieldset>
|
||||
<h5 class="text-black-50 mb-3 fw-light"><?= lang('appointment_details_title') ?></h5>
|
||||
|
||||
<input id="appointment-id" type="hidden">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label for="select-service" class="form-label">
|
||||
<?= lang('service') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<select id="select-service" class="required form-select">
|
||||
<?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) {
|
||||
if (!empty($service['category_id'])) {
|
||||
$has_category = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($has_category) {
|
||||
$grouped_services = [];
|
||||
|
||||
foreach ($available_services as $service) {
|
||||
if (!empty($service['category_id'])) {
|
||||
if (!isset($grouped_services[$service['category_name']])) {
|
||||
$grouped_services[$service['category_name']] = [];
|
||||
}
|
||||
|
||||
$grouped_services[$service['category_name']][] = $service;
|
||||
}
|
||||
}
|
||||
|
||||
// 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) {
|
||||
if ($service['category_id'] == null) {
|
||||
$grouped_services['uncategorized'][] = $service;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($grouped_services as $key => $group) {
|
||||
$group_label =
|
||||
$key !== 'uncategorized'
|
||||
? e($group[0]['category_name'])
|
||||
: 'Uncategorized';
|
||||
|
||||
if (count($group) > 0) {
|
||||
echo '<optgroup label="' . $group_label . '">';
|
||||
|
||||
foreach ($group as $service) {
|
||||
echo '<option value="' .
|
||||
$service['id'] .
|
||||
'">' .
|
||||
e($service['name']) .
|
||||
'</option>';
|
||||
}
|
||||
|
||||
echo '</optgroup>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($available_services as $service) {
|
||||
echo '<option value="' .
|
||||
$service['id'] .
|
||||
'">' .
|
||||
e($service['name']) .
|
||||
'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php slot('after_select_appointment_service'); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="select-provider" class="form-label">
|
||||
<?= lang('provider') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<select id="select-provider" class="required form-select"></select>
|
||||
</div>
|
||||
|
||||
<?php slot('after_select_appointment_provider'); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<?php component('color_selection', ['attributes' => 'id="appointment-color"']); ?>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="appointment-location" class="form-label">
|
||||
<?= lang('location') ?>
|
||||
</label>
|
||||
<input id="appointment-location" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="appointment-status" class="form-label">
|
||||
<?= lang('status') ?>
|
||||
</label>
|
||||
<select id="appointment-status" class="form-select">
|
||||
<?php foreach ($appointment_status_options as $appointment_status_option): ?>
|
||||
<option value="<?= e($appointment_status_option) ?>">
|
||||
<?= e($appointment_status_option) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label for="start-datetime"
|
||||
class="form-label"><?= lang('start_date_time') ?></label>
|
||||
<input id="start-datetime" class="required form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="end-datetime" class="form-label"><?= lang('end_date_time') ?></label>
|
||||
<input id="end-datetime" class="required form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">
|
||||
<?= lang('timezone') ?>
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="border rounded d-flex justify-content-between align-items-center bg-light timezone-info">
|
||||
<div class="border-end w-50 p-1 text-center">
|
||||
<small>
|
||||
<?= lang('provider') ?>:
|
||||
<span class="provider-timezone">
|
||||
-
|
||||
</span>
|
||||
</small>
|
||||
</div>
|
||||
<div class="w-50 p-1 text-center">
|
||||
<small>
|
||||
<?= lang('current_user') ?>:
|
||||
<span>
|
||||
<?= $timezones[session('timezone', 'UTC')] ?>
|
||||
</span>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="appointment-notes" class="form-label"><?= lang('notes') ?></label>
|
||||
<textarea id="appointment-notes" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
|
||||
<?php slot('after_primary_appointment_fields'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<?php slot('after_appointment_details'); ?>
|
||||
|
||||
<br>
|
||||
|
||||
<fieldset>
|
||||
<h5 class="text-black-50 mb-3 fw-light">
|
||||
<?= lang('customer_details_title') ?>
|
||||
<button id="new-customer" class="btn btn-outline-secondary btn-sm" type="button"
|
||||
data-tippy-content="<?= lang('clear_fields_add_existing_customer_hint') ?>">
|
||||
<i class="fas fa-plus-square me-2"></i>
|
||||
<?= lang('new') ?>
|
||||
</button>
|
||||
<button id="select-customer" class="btn btn-outline-secondary btn-sm" type="button"
|
||||
data-tippy-content="<?= lang('pick_existing_customer_hint') ?>">
|
||||
<i class="fas fa-hand-pointer me-2"></i>
|
||||
<span>
|
||||
<?= lang('select') ?>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<input id="filter-existing-customers"
|
||||
placeholder="<?= lang('type_to_filter_customers') ?>"
|
||||
style="display: none;" class="input-sm form-control">
|
||||
</h5>
|
||||
|
||||
<div id="existing-customers-list" style="display: none;"></div>
|
||||
|
||||
<input id="customer-id" type="hidden">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label for="first-name" class="form-label">
|
||||
<?= lang('first_name') ?>
|
||||
<?php if ($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"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="last-name" class="form-label">
|
||||
<?= lang('last_name') ?>
|
||||
<?php if ($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"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
<?= lang('email') ?>
|
||||
<?php if ($require_email): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="email"
|
||||
class="<?= $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): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="phone-number" maxlength="60"
|
||||
class="<?= $require_phone_number ? 'required' : '' ?> form-control"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="language">
|
||||
<?= lang('language') ?>
|
||||
<span class="text-danger" hidden>*</span>
|
||||
</label>
|
||||
<select id="language" class="form-select required">
|
||||
<?php foreach (vars('available_languages') as $available_language): ?>
|
||||
<option value="<?= $available_language ?>">
|
||||
<?= ucfirst($available_language) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php component('custom_fields'); ?>
|
||||
|
||||
<?php slot('after_primary_customer_custom_fields'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">
|
||||
<?= lang('address') ?>
|
||||
<?php if ($require_address): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="address"
|
||||
class="<?= $require_address ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="city" class="form-label">
|
||||
<?= lang('city') ?>
|
||||
<?php if ($require_city): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="city"
|
||||
class="<?= $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): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="zip-code"
|
||||
class="<?= $require_zip_code ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="timezone">
|
||||
<?= lang('timezone') ?>
|
||||
<span class="text-danger" hidden>*</span>
|
||||
</label>
|
||||
<?php component('timezone_dropdown', [
|
||||
'attributes' => 'id="timezone" class="form-control required"',
|
||||
'grouped_timezones' => vars('grouped_timezones'),
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="customer-notes" class="form-label">
|
||||
<?= lang('notes') ?>
|
||||
<?php if ($require_notes): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<textarea id="customer-notes" rows="2"
|
||||
class="<?= $require_notes ? 'required' : '' ?> form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<?php slot('after_primary_customer_fields'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<?php slot('after_customer_details'); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<?php slot('before_appointment_actions'); ?>
|
||||
|
||||
<button class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('cancel') ?>
|
||||
</button>
|
||||
<button id="save-appointment" class="btn btn-primary">
|
||||
<i class="fas fa-check-square me-2"></i>
|
||||
<?= lang('save') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php section('scripts'); ?>
|
||||
|
||||
<script src="<?= asset_url('assets/js/components/appointments_modal.js') ?>"></script>
|
||||
|
||||
<?php end_section('scripts'); ?>
|
||||
52
application/views/components/backend_footer.php
Normal file
52
application/views/components/backend_footer.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @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 mt-auto">
|
||||
<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">
|
||||
|
||||
<a href="https://easyappointments.org">Easy!Appointments</a>
|
||||
|
||||
<span>v<?= config('version') ?></span>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 me-lg-5 mb-lg-0">
|
||||
<img class="me-1" src="<?= base_url('assets/img/alextselegidis-logo-16x16.png') ?>" alt="Alex Tselegidis Logo">
|
||||
|
||||
<a href="https://alextselegidis.com">Alex Tselegidis</a>
|
||||
|
||||
© <?= date('Y') ?> - Software Development
|
||||
</div>
|
||||
|
||||
<div class="mb-3 me-lg-5 mb-lg-0">
|
||||
<?= lang('licensed_under') ?>
|
||||
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html">
|
||||
GPL-3.0
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 me-lg-5 mb-lg-0">
|
||||
<span id="select-language" class="badge bg-dark">
|
||||
<i class="fas fa-language me-2"></i>
|
||||
<?= ucfirst(config('language')) ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 me-lg-5 mb-lg-0">
|
||||
<a href="<?= site_url('appointments') ?>">
|
||||
<?= lang('go_to_booking_page') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="ms-lg-auto">
|
||||
<strong id="footer-user-display-name">
|
||||
<?= lang('hello') . ', ' . e($user_display_name) ?>!
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
127
application/views/components/backend_header.php
Normal file
127
application/views/components/backend_header.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var string $active_menu
|
||||
* @var string $company_logo
|
||||
*/
|
||||
?>
|
||||
|
||||
<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">
|
||||
<h6>EASY!APPOINTMENTS</h6>
|
||||
<small>Online Appointment Scheduler</small>
|
||||
</div>
|
||||
|
||||
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#header-menu">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<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' : ''; ?>
|
||||
<li class="nav-item <?= $active . $hidden ?>">
|
||||
<a href="<?= site_url(
|
||||
'calendar' . (vars('calendar_view') === CALENDAR_VIEW_TABLE ? '?view=table' : ''),
|
||||
) ?>"
|
||||
class="nav-link"
|
||||
data-tippy-content="<?= lang('manage_appointment_record_hint') ?>">
|
||||
<i class="fas fa-calendar-alt me-2"></i>
|
||||
<?= lang('calendar') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_CUSTOMERS) ? '' : 'd-none'; ?>
|
||||
<?php $active = $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') ?>">
|
||||
<i class="fas fa-user-friends me-2"></i>
|
||||
<?= lang('customers') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_SERVICES) ? '' : 'd-none'; ?>
|
||||
<?php $active = $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') ?>">
|
||||
<i class="fas fa-business-time me-2"></i>
|
||||
<?= lang('services') ?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" href="<?= site_url('services') ?>">
|
||||
<?= lang('services') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('service_categories') ?>">
|
||||
<?= lang('categories') ?>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php $hidden = can('view', PRIV_USERS) ? '' : 'd-none'; ?>
|
||||
<?php $active = $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') ?>">
|
||||
<i class="fas fa-users me-2"></i>
|
||||
<?= lang('users') ?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" href="<?= site_url('providers') ?>">
|
||||
<?= lang('providers') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('secretaries') ?>">
|
||||
<?= lang('secretaries') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('admins') ?>">
|
||||
<?= lang('admins') ?>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php slot('before_user_nav_item'); ?>
|
||||
|
||||
<?php $hidden = can('view', PRIV_SYSTEM_SETTINGS) || can('view', PRIV_USER_SETTINGS) ? '' : 'd-none'; ?>
|
||||
<?php $active = $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') ?>">
|
||||
<i class="fas fa-user me-2"></i>
|
||||
<?= e(vars('user_display_name')) ?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<?php if (can('view', PRIV_SYSTEM_SETTINGS)): ?>
|
||||
<a class="dropdown-item" href="<?= site_url('general_settings') ?>">
|
||||
<?= lang('settings') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php slot('after_settings_dropdown_item'); ?>
|
||||
|
||||
<a class="dropdown-item" href="<?= site_url('account') ?>">
|
||||
<?= lang('account') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('about') ?>">
|
||||
<?= lang('about') ?>
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?= site_url('logout') ?>">
|
||||
<?= lang('log_out') ?>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div id="notification" style="display: none;"></div>
|
||||
|
||||
<div id="loading" style="display: none;">
|
||||
<div class="any-element animation is-loading">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
42
application/views/components/booking_cancellation_frame.php
Normal file
42
application/views/components/booking_cancellation_frame.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var bool $manage_mode
|
||||
* @var array $appointment_data
|
||||
* @var bool $display_delete_personal_information
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ($manage_mode): ?>
|
||||
<div id="cancel-appointment-frame" class="row booking-header-bar">
|
||||
<div class="col-md-10">
|
||||
<small><?= lang('cancel_appointment_hint') ?></small>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<form id="cancel-appointment-form" method="post"
|
||||
action="<?= site_url('booking_cancellation/of/' . $appointment_data['hash']) ?>">
|
||||
|
||||
<input id="hidden-cancellation-reason" name="cancellation_reason" type="hidden">
|
||||
|
||||
<button id="cancel-appointment" class="btn btn-warning btn-sm">
|
||||
<i class="fas fa-trash me-2"></i>
|
||||
<?= lang('cancel') ?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($display_delete_personal_information): ?>
|
||||
<div class="booking-header-bar row">
|
||||
<div class="col-md-10">
|
||||
<small><?= lang('delete_personal_information_hint') ?></small>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button id="delete-personal-information" class="btn btn-danger btn-sm">
|
||||
<i class="fas fa-trash me-2"></i>
|
||||
<?= lang('delete') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
90
application/views/components/booking_final_step.php
Normal file
90
application/views/components/booking_final_step.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var bool $manage_mode
|
||||
* @var string $display_terms_and_conditions
|
||||
* @var string $display_privacy_policy
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-4" class="wizard-frame" style="display:none;">
|
||||
<div class="frame-container">
|
||||
<h2 class="frame-title"><?= lang('appointment_confirmation') ?></h2>
|
||||
|
||||
<div class="row frame-content m-auto pt-md-4 mb-4">
|
||||
<div id="appointment-details" class="col-12 col-md-6 text-center text-md-start mb-2 mb-md-0">
|
||||
<!-- JS -->
|
||||
</div>
|
||||
|
||||
<div id="customer-details" class="col-12 col-md-6 text-center text-md-end">
|
||||
<!-- JS -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php slot('after_details'); ?>
|
||||
|
||||
<?php if (setting('require_captcha')): ?>
|
||||
<div class="row frame-content m-auto">
|
||||
<div class="col">
|
||||
<label class="captcha-title" for="captcha-text">
|
||||
CAPTCHA
|
||||
<button class="btn btn-link text-dark text-decoration-none py-0">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
</label>
|
||||
<img class="captcha-image" src="<?= site_url('captcha') ?>" alt="CAPTCHA">
|
||||
<input id="captcha-text" class="captcha-text form-control" type="text" value=""/>
|
||||
<span id="captcha-hint" class="help-block" style="opacity:0"> </span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php slot('after_captcha'); ?>
|
||||
</div>
|
||||
|
||||
<div class="d-flex fs-6 justify-content-around">
|
||||
<?php if ($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">
|
||||
<?= strtr(lang('read_and_agree_to_terms_and_conditions'), [
|
||||
'{$link}' => '<a href="#" data-bs-toggle="modal" data-bs-target="#terms-and-conditions-modal">',
|
||||
'{/$link}' => '</a>',
|
||||
]) ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($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">
|
||||
<?= strtr(lang('read_and_agree_to_privacy_policy'), [
|
||||
'{$link}' => '<a href="#" data-bs-toggle="modal" data-bs-target="#privacy-policy-modal">',
|
||||
'{/$link}' => '</a>',
|
||||
]) ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php slot('after_select_policies'); ?>
|
||||
</div>
|
||||
|
||||
<div class="command-buttons">
|
||||
<button type="button" id="button-back-4" class="btn button-back btn-outline-secondary"
|
||||
data-step_index="4">
|
||||
<i class="fas fa-chevron-left me-2"></i>
|
||||
<?= lang('back') ?>
|
||||
</button>
|
||||
<form id="book-appointment-form" style="display:inline-block" method="post">
|
||||
<button id="book-appointment-submit" type="button" class="btn btn-primary">
|
||||
<i class="fas fa-check-square me-2"></i>
|
||||
<?= $manage_mode ? lang('update') : lang('confirm') ?>
|
||||
</button>
|
||||
<input type="hidden" name="csrfToken"/>
|
||||
<input type="hidden" name="post_data"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
31
application/views/components/booking_footer.php
Normal file
31
application/views/components/booking_footer.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var bool $display_login_button
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="frame-footer">
|
||||
<small>
|
||||
<span class="footer-powered-by small">
|
||||
Powered By
|
||||
<a href="https://easyappointments.org" target="_blank">Easy!Appointments</a>
|
||||
</span>
|
||||
|
||||
<span class="footer-options">
|
||||
<span id="select-language" class="badge bg-secondary">
|
||||
<i class="fas fa-language me-2"></i>
|
||||
<?= ucfirst(config('language')) ?>
|
||||
</span>
|
||||
|
||||
<?php if ($display_login_button): ?>
|
||||
<a class="backend-link badge bg-primary text-decoration-none px-2"
|
||||
href="<?= session('user_id') ? site_url('calendar') : site_url('login') ?>">
|
||||
<i class="fas fa-sign-in-alt me-2"></i>
|
||||
<?= session('user_id') ? lang('backend_section') : lang('login') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</small>
|
||||
</div>
|
||||
43
application/views/components/booking_header.php
Normal file
43
application/views/components/booking_header.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var string $company_name
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="header">
|
||||
<div id="company-name">
|
||||
<img src="<?= vars('company_logo') ?: base_url('assets/img/logo.png') ?>" alt="logo" id="company-logo">
|
||||
|
||||
<span>
|
||||
<?= e($company_name) ?>
|
||||
</span>
|
||||
|
||||
<div class="d-flex justify-content-center justify-content-md-start">
|
||||
<span class="display-booking-selection">
|
||||
<?= lang('service') ?> │ <?= lang('provider') ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="steps">
|
||||
<div id="step-1" class="book-step active-step"
|
||||
data-tippy-content="<?= lang('service_and_provider') ?>">
|
||||
<strong>1</strong>
|
||||
</div>
|
||||
|
||||
<div id="step-2" class="book-step" data-bs-toggle="tooltip"
|
||||
data-tippy-content="<?= lang('appointment_date_and_time') ?>">
|
||||
<strong>2</strong>
|
||||
</div>
|
||||
<div id="step-3" class="book-step" data-bs-toggle="tooltip"
|
||||
data-tippy-content="<?= lang('customer_information') ?>">
|
||||
<strong>3</strong>
|
||||
</div>
|
||||
<div id="step-4" class="book-step" data-bs-toggle="tooltip"
|
||||
data-tippy-content="<?= lang('appointment_confirmation') ?>">
|
||||
<strong>4</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
158
application/views/components/booking_info_step.php
Normal file
158
application/views/components/booking_info_step.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-3" class="wizard-frame" style="display:none;">
|
||||
<div class="frame-container">
|
||||
|
||||
<h2 class="frame-title"><?= lang('customer_information') ?></h2>
|
||||
|
||||
<div class="row frame-content">
|
||||
<div class="col-12 col-md-6 field-col mx-auto">
|
||||
<?php if ($display_first_name): ?>
|
||||
<div class="mb-3">
|
||||
<label for="first-name" class="form-label">
|
||||
<?= lang('first_name') ?>
|
||||
<?php if ($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"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($display_last_name): ?>
|
||||
<div class="mb-3">
|
||||
<label for="last-name" class="form-label">
|
||||
<?= lang('last_name') ?>
|
||||
<?php if ($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"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($display_email): ?>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
<?= lang('email') ?>
|
||||
<?php if ($require_email): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="email"
|
||||
class="<?= $require_email ? 'required' : '' ?> form-control" maxlength="120"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($display_phone_number): ?>
|
||||
<div class="mb-3">
|
||||
<label for="phone-number" class="form-label">
|
||||
<?= lang('phone_number') ?>
|
||||
<?php if ($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"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php slot('info_first_column'); ?>
|
||||
|
||||
<?php component('custom_fields'); ?>
|
||||
|
||||
<?php slot('after_custom_fields'); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6 field-col mx-auto">
|
||||
<?php if ($display_address): ?>
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">
|
||||
<?= lang('address') ?>
|
||||
<?php if ($require_address): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="address" class="<?= $require_address ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($display_city): ?>
|
||||
<div class="mb-3">
|
||||
<label for="city" class="form-label">
|
||||
<?= lang('city') ?>
|
||||
<?php if ($require_city): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="city" class="<?= $require_city ? 'required' : '' ?> form-control"
|
||||
maxlength="120"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($display_zip_code): ?>
|
||||
<div class="mb-3">
|
||||
<label for="zip-code" class="form-label">
|
||||
<?= lang('zip_code') ?>
|
||||
<?php if ($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"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($display_notes): ?>
|
||||
<div class="mb-3">
|
||||
<label for="notes" class="form-label">
|
||||
<?= lang('notes') ?>
|
||||
<?php if ($require_notes): ?>
|
||||
<span class="text-danger">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<textarea id="notes" maxlength="500"
|
||||
class="<?= $require_notes ? 'required' : '' ?> form-control" rows="1"></textarea>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php slot('info_second_column'); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="command-buttons">
|
||||
<button type="button" id="button-back-3" class="btn button-back btn-outline-secondary"
|
||||
data-step_index="3">
|
||||
<i class="fas fa-chevron-left me-2"></i>
|
||||
<?= lang('back') ?>
|
||||
</button>
|
||||
<button type="button" id="button-next-3" class="btn button-next btn-dark"
|
||||
data-step_index="3">
|
||||
<?= lang('next') ?>
|
||||
<i class="fas fa-chevron-right ms-2"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
56
application/views/components/booking_time_step.php
Normal file
56
application/views/components/booking_time_step.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var array $grouped_timezones
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-2" class="wizard-frame" style="display:none;">
|
||||
<div class="frame-container">
|
||||
|
||||
<h2 class="frame-title"><?= lang('appointment_date_and_time') ?></h2>
|
||||
|
||||
<div class="row frame-content">
|
||||
<div class="col-12 col-md-6">
|
||||
<div id="select-date"></div>
|
||||
|
||||
<?php slot('after_select_date'); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6">
|
||||
<div id="select-time">
|
||||
<div class="mb-3">
|
||||
<label for="select-timezone" class="form-label">
|
||||
<?= lang('timezone') ?>
|
||||
</label>
|
||||
<?php component('timezone_dropdown', [
|
||||
'attributes' => 'id="select-timezone" class="form-select" value="UTC"',
|
||||
'grouped_timezones' => $grouped_timezones,
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
<?php slot('after_select_timezone'); ?>
|
||||
|
||||
|
||||
<div id="available-hours"></div>
|
||||
|
||||
<?php slot('after_available_hours'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="command-buttons">
|
||||
<button type="button" id="button-back-2" class="btn button-back btn-outline-secondary"
|
||||
data-step_index="2">
|
||||
<i class="fas fa-chevron-left me-2"></i>
|
||||
<?= lang('back') ?>
|
||||
</button>
|
||||
<button type="button" id="button-next-2" class="btn button-next btn-dark"
|
||||
data-step_index="2">
|
||||
<?= lang('next') ?>
|
||||
<i class="fas fa-chevron-right ms-2"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
116
application/views/components/booking_type_step.php
Normal file
116
application/views/components/booking_type_step.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var array $available_services
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="wizard-frame-1" class="wizard-frame" style="visibility: hidden;">
|
||||
<div class="frame-container">
|
||||
<h2 class="frame-title mt-md-5"><?= lang('service_and_provider') ?></h2>
|
||||
|
||||
<div class="row frame-content">
|
||||
<div class="col col-md-8 offset-md-2">
|
||||
<div class="mb-3">
|
||||
<label for="select-service">
|
||||
<strong><?= lang('service') ?></strong>
|
||||
</label>
|
||||
|
||||
<select id="select-service" class="form-select">
|
||||
<option value="">
|
||||
<?= lang('please_select') ?>
|
||||
</option>
|
||||
<?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) {
|
||||
if (!empty($service['service_category_id'])) {
|
||||
$has_category = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($has_category) {
|
||||
$grouped_services = [];
|
||||
|
||||
foreach ($available_services as $service) {
|
||||
if (!empty($service['service_category_id'])) {
|
||||
if (!isset($grouped_services[$service['service_category_name']])) {
|
||||
$grouped_services[$service['service_category_name']] = [];
|
||||
}
|
||||
|
||||
$grouped_services[$service['service_category_name']][] = $service;
|
||||
}
|
||||
}
|
||||
|
||||
// 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) {
|
||||
if ($service['service_category_id'] == null) {
|
||||
$grouped_services['uncategorized'][] = $service;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($grouped_services as $key => $group) {
|
||||
$group_label =
|
||||
$key !== 'uncategorized' ? $group[0]['service_category_name'] : 'Uncategorized';
|
||||
|
||||
if (count($group) > 0) {
|
||||
echo '<optgroup label="' . e($group_label) . '">';
|
||||
foreach ($group as $service) {
|
||||
echo '<option value="' .
|
||||
$service['id'] .
|
||||
'">' .
|
||||
e($service['name']) .
|
||||
'</option>';
|
||||
}
|
||||
echo '</optgroup>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($available_services as $service) {
|
||||
echo '<option value="' . $service['id'] . '">' . e($service['name']) . '</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php slot('after_select_service'); ?>
|
||||
|
||||
<div class="mb-3" hidden>
|
||||
<label for="select-provider">
|
||||
<strong><?= lang('provider') ?></strong>
|
||||
</label>
|
||||
|
||||
<select id="select-provider" class="form-select">
|
||||
<option value="">
|
||||
<?= lang('please_select') ?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php slot('after_select_provider'); ?>
|
||||
|
||||
<div id="service-description" class="small">
|
||||
<!-- JS -->
|
||||
</div>
|
||||
|
||||
<?php slot('after_service_description'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="command-buttons">
|
||||
<span> </span>
|
||||
|
||||
<button type="button" id="button-next-1" class="btn button-next btn-dark"
|
||||
data-step_index="1">
|
||||
<?= lang('next') ?>
|
||||
<i class="fas fa-chevron-right ms-2"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
65
application/views/components/color_selection.php
Normal file
65
application/views/components/color_selection.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $attributes
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php section('styles'); ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/components/color_selection.css') ?>">
|
||||
|
||||
<?php end_section('styles'); ?>
|
||||
|
||||
<label class="form-label"><?= lang('color') ?></label>
|
||||
|
||||
<div <?= $attributes ?? '' ?> class="color-selection d-flex justify-content-between mb-4">
|
||||
<button type="button" class="color-selection-option selected" data-value="#7cbae8">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#acbefb">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#82e4ec">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#7cebc1">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#abe9a4">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#ebe07c">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#f3bc7d">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#f3aea6">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#eb8687">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#dfaffe">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
|
||||
<button type="button" class="color-selection-option" data-value="#e3e3e3">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<?php section('scripts'); ?>
|
||||
|
||||
<script src="<?= asset_url('assets/js/components/color_selection.js') ?>"></script>
|
||||
|
||||
<?php end_section('scripts'); ?>
|
||||
197
application/views/components/company_color_style.php
Normal file
197
application/views/components/company_color_style.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $company_color
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (!empty($company_color) && $company_color !== DEFAULT_COMPANY_COLOR): ?>
|
||||
<style>
|
||||
/* Generic Overrides */
|
||||
|
||||
a {
|
||||
color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: <?= $company_color ?>;
|
||||
border-color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-primary:active,
|
||||
.btn-primary:focus {
|
||||
background-color: <?= $company_color ?>;
|
||||
border-color: <?= $company_color ?>;
|
||||
filter: brightness(120%);
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-primary:disabled, .btn-primary.disabled {
|
||||
background-color: <?= $company_color ?>;
|
||||
border-color: <?= $company_color ?>;
|
||||
filter: brightness(70%);
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
.dropdown-item.active,
|
||||
.dropdown-item:active {
|
||||
background-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
background-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.nav .nav-link:not(.active) {
|
||||
color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
border-color: <?= $company_color ?> !important;
|
||||
filter: brightness(120%);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-check-input:checked {
|
||||
background-color: <?= $company_color ?> !important;
|
||||
border-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
body .ui-datepicker .ui-slider-handle {
|
||||
border-color: <?= $company_color ?> !important;
|
||||
background-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
body .modal-header {
|
||||
background: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.fc-daygrid-event {
|
||||
color: rgb(51, 51, 51) !important;
|
||||
}
|
||||
|
||||
body .ui-draggable .ui-dialog-titlebar {
|
||||
background: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
/* Booking Layout */
|
||||
|
||||
#book-appointment-wizard #header {
|
||||
background: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
#book-appointment-wizard #company-name .display-selected-service,
|
||||
#book-appointment-wizard #company-name .display-selected-provider {
|
||||
color: <?= $company_color ?>;
|
||||
border-right-color: <?= $company_color ?> !important;
|
||||
filter: brightness(35%);
|
||||
}
|
||||
|
||||
#book-appointment-wizard .book-step {
|
||||
background: <?= $company_color ?>;
|
||||
filter: brightness(75%);
|
||||
}
|
||||
|
||||
#book-appointment-wizard .book-step strong {
|
||||
color: <?= $company_color ?>;
|
||||
filter: brightness(200%);
|
||||
}
|
||||
|
||||
body .ui-widget.ui-widget-content {
|
||||
border-color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
body .ui-datepicker .ui-widget-header {
|
||||
background-color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
body .ui-datepicker th {
|
||||
background-color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
body .ui-datepicker .ui-datepicker-next-hover,
|
||||
body .ui-datepicker .ui-datepicker-prev-hover {
|
||||
background: <?= $company_color ?>;
|
||||
border-color: <?= $company_color ?>;
|
||||
filter: brightness(140%);
|
||||
}
|
||||
|
||||
body .ui-datepicker td a, body .ui-datepicker td span {
|
||||
color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
html body .ui-datepicker td a.ui-state-active {
|
||||
background: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
body .ui-datepicker td a.ui-state-highlight {
|
||||
background: <?= $company_color ?> !important;
|
||||
filter: brightness(140%);
|
||||
}
|
||||
|
||||
#book-appointment-wizard #available-hours .selected-hour {
|
||||
background-color: <?= $company_color ?>;
|
||||
border-color: <?= $company_color ?>;
|
||||
}
|
||||
|
||||
#frame-footer .backend-link {
|
||||
background-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
#frame-footer .backend-link:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Backend Layout */
|
||||
|
||||
#header {
|
||||
background-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
#header #header-menu .nav-item:hover,
|
||||
#header #header-menu .nav-item.active {
|
||||
background: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
#header #header-logo small {
|
||||
color: <?= $company_color ?> !important;
|
||||
filter: brightness(60%);
|
||||
}
|
||||
|
||||
.backend-page .filter-records .results .entry.selected {
|
||||
border-right-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.flatpickr-calendar .flatpickr-months,
|
||||
.flatpickr-calendar .flatpickr-months .flatpickr-month,
|
||||
.flatpickr-calendar .flatpickr-weekdays,
|
||||
.flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
|
||||
.flatpickr-calendar span.flatpickr-weekday {
|
||||
background: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.flatpickr-day.endRange, .flatpickr-day.endRange.inRange, .flatpickr-day.endRange.nextMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.endRange:focus, .flatpickr-day.endRange:hover, .flatpickr-day.selected, .flatpickr-day.selected.inRange, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.selected:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.startRange.inRange, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.startRange:focus, .flatpickr-day.startRange:hover {
|
||||
background: <?= $company_color ?> !important;
|
||||
border-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
|
||||
background-color: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
#existing-customers-list div:hover {
|
||||
background: <?= $company_color ?> !important;
|
||||
}
|
||||
|
||||
#book-appointment-wizard #company-name .display-booking-selection {
|
||||
color: <?= $company_color ?>;
|
||||
border-right-color: <?= $company_color ?>;
|
||||
filter: brightness(280%);
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
25
application/views/components/cookie_notice_modal.php
Normal file
25
application/views/components/cookie_notice_modal.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var string $cookie_notice_content
|
||||
*/
|
||||
?>
|
||||
<div id="cookie-notice-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><?= lang('cookie_notice') ?></h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?= pure_html($cookie_notice_content) ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('close') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
24
application/views/components/custom_fields.php
Normal file
24
application/views/components/custom_fields.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var bool $disabled (false)
|
||||
*/
|
||||
|
||||
$disabled = $disabled ?? false; ?>
|
||||
|
||||
<?php for ($i = 1; $i <= 5; $i++): ?>
|
||||
<?php if (setting('display_custom_field_' . $i)): ?>
|
||||
<div class="mb-3">
|
||||
<label for="custom-field-<?= $i ?>" class="form-label">
|
||||
<?= setting('label_custom_field_' . $i) ?: lang('custom_field') . ' #' . $i ?>
|
||||
<?php if (setting('require_custom_field_' . $i)): ?>
|
||||
<span class="text-danger" <?= $disabled ? 'hidden' : '' ?>>*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="text" id="custom-field-<?= $i ?>"
|
||||
class="<?= setting('require_custom_field_' . $i) ? 'required' : '' ?> form-control"
|
||||
maxlength="120" <?= $disabled ? 'disabled' : '' ?>/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endfor; ?>
|
||||
38
application/views/components/google_analytics_script.php
Normal file
38
application/views/components/google_analytics_script.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $google_analytics_code
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (substr($google_analytics_code ?? '', 0, 2) === 'UA'): ?>
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i["GoogleAnalyticsObject"] = r;
|
||||
i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date();
|
||||
a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0];
|
||||
a.async = 1;
|
||||
a.src = g;
|
||||
m.parentNode.insertBefore(a, m)
|
||||
})(window, document, "script", "//www.google-analytics.com/analytics.js", "ga");
|
||||
ga("create", "<?= e($google_analytics_code) ?>", "auto");
|
||||
ga("send", "pageview");
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (substr($google_analytics_code ?? '', 0, 2) === 'G-'): ?>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=' . $google_analytics_code . '"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag("js", new Date());
|
||||
gtag("config", "<?= e($google_analytics_code) ?>");
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
19
application/views/components/js_lang_script.php
Normal file
19
application/views/components/js_lang_script.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<script>
|
||||
window.lang = (function () {
|
||||
const lang = <?= json_encode(html_vars('language')) ?>;
|
||||
|
||||
return (key) => {
|
||||
if (!key) {
|
||||
return lang;
|
||||
}
|
||||
|
||||
if (!lang[key]) {
|
||||
console.error(`Cannot find translation for requested key: "${key}"`);
|
||||
return key;
|
||||
}
|
||||
|
||||
return lang[key];
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
|
||||
14
application/views/components/js_vars_script.php
Normal file
14
application/views/components/js_vars_script.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<script>
|
||||
window.vars = (function () {
|
||||
const vars = <?= json_encode(script_vars()) ?>;
|
||||
|
||||
return (key) => {
|
||||
if (!key) {
|
||||
return vars;
|
||||
}
|
||||
|
||||
return vars[key] || undefined;
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
|
||||
105
application/views/components/ldap_import_modal.php
Normal file
105
application/views/components/ldap_import_modal.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var array $roles
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="ldap-import-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?= lang('import') ?></h3>
|
||||
<button class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-ldap-dn">
|
||||
<?= lang('ldap_dn') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="ldap-import-ldap-dn" class="form-control required" maxlength="256">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-role-slug">
|
||||
<?= lang('role') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<select id="ldap-import-role-slug" class="form-select required">
|
||||
<?php foreach ($roles as $role): ?>
|
||||
<option value="<?= $role['slug'] ?>">
|
||||
<?= $role['name'] ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-first-name">
|
||||
<?= lang('first_name') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="ldap-import-first-name" class="form-control required" maxlength="256">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-last-name">
|
||||
<?= lang('last_name') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="ldap-import-last-name" class="form-control required" maxlength="256">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-email">
|
||||
<?= lang('email') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="ldap-import-email" class="form-control required" max="512">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-phone-number">
|
||||
<?= lang('phone_number') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="ldap-import-phone-number" class="form-control required" max="128">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-username">
|
||||
<?= lang('username') ?>
|
||||
</label>
|
||||
<input id="ldap-import-username" class="form-control" maxlength="256">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="ldap-import-password">
|
||||
<?= lang('password') ?>
|
||||
</label>
|
||||
<input type="password" id="ldap-import-password" class="form-control"
|
||||
maxlength="512" autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('cancel') ?>
|
||||
</button>
|
||||
<button id="ldap-import-save" class="btn btn-primary">
|
||||
<i class="fas fa-check-square me-2"></i>
|
||||
<?= lang('save') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php section('scripts'); ?>
|
||||
|
||||
<script src="<?= asset_url('assets/js/components/ldap_import_modal.js') ?>"></script>
|
||||
|
||||
<?php end_section('scripts'); ?>
|
||||
33
application/views/components/matomo_analytics_script.php
Normal file
33
application/views/components/matomo_analytics_script.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $matomo_analytics_url
|
||||
* @var string $matomo_analytics_site_id
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (!empty($matomo_analytics_url)): ?>
|
||||
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function () {
|
||||
var u = "<?= e($matomo_analytics_url) ?>";
|
||||
_paq.push(['setTrackerUrl', u + 'matomo.php']);
|
||||
_paq.push(['setSiteId', '<?= e($matomo_analytics_site_id) ?>']);
|
||||
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
|
||||
g.async = true;
|
||||
g.src = u + 'matomo.js';
|
||||
s.parentNode.insertBefore(g, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<p><img src="<?= e($matomo_analytics_url) ?>matomo.php?idsite=<?= e(
|
||||
$matomo_analytics_site_id,
|
||||
) ?>&rec=1" style="border:0;" alt=""/></p>
|
||||
</noscript>
|
||||
|
||||
<?php endif; ?>
|
||||
26
application/views/components/privacy_policy_modal.php
Normal file
26
application/views/components/privacy_policy_modal.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var string $privacy_policy_content
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="privacy-policy-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><?= lang('privacy_policy') ?></h4>
|
||||
<button class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?= pure_html($privacy_policy_content) ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('close') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
35
application/views/components/settings_nav.php
Normal file
35
application/views/components/settings_nav.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<h4 class=" text-black-50 py-3 mb-3 border-bottom fw-light">
|
||||
<?= lang('settings') ?>
|
||||
</h4>
|
||||
|
||||
<ul id="settings-nav" class="nav flex-column">
|
||||
<li class="nav-item mb-3">
|
||||
<a class="nav-link px-0 py-2" href="<?= site_url('general_settings') ?>">
|
||||
<?= lang('general_settings') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mb-3">
|
||||
<a class="nav-link px-0 py-2" href="<?= site_url('booking_settings') ?>">
|
||||
<?= lang('booking_settings') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mb-3">
|
||||
<a class="nav-link px-0 py-2" href="<?= site_url('business_settings') ?>">
|
||||
<?= lang('business_logic') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mb-3">
|
||||
<a class="nav-link px-0 py-2" href="<?= site_url('legal_settings') ?>">
|
||||
<?= lang('legal_contents') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mb-3">
|
||||
<a class="nav-link px-0 py-2" href="<?= site_url('integrations') ?>">
|
||||
<?= lang('integrations') ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
26
application/views/components/terms_and_conditions_modal.php
Normal file
26
application/views/components/terms_and_conditions_modal.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var string $terms_and_conditions_content
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="terms-and-conditions-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><?= lang('terms_and_conditions') ?></h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?= pure_html($terms_and_conditions_content) ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('close') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
18
application/views/components/timezone_dropdown.php
Normal file
18
application/views/components/timezone_dropdown.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var string $attributes
|
||||
* @var array $grouped_timezones
|
||||
*/
|
||||
?>
|
||||
|
||||
<select <?= $attributes ?>>
|
||||
<?php foreach ($grouped_timezones as $continent => $entries): ?>
|
||||
<optgroup label="<?= $continent ?>">
|
||||
<?php foreach ($entries as $value => $name): ?>
|
||||
<option value="<?= $value ?>"><?= $name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
105
application/views/components/unavailabilities_modal.php
Normal file
105
application/views/components/unavailabilities_modal.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/**
|
||||
* Local variables.
|
||||
*
|
||||
* @var array $timezones
|
||||
* @var string $timezone
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="unavailabilities-modal" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?= lang('new_unavailability_title') ?></h3>
|
||||
<button class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-message alert d-none"></div>
|
||||
|
||||
<form>
|
||||
<fieldset>
|
||||
<input id="unavailability-id" type="hidden">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="unavailability-provider" class="form-label">
|
||||
<?= lang('provider') ?>
|
||||
</label>
|
||||
<select id="unavailability-provider" class="form-select"></select>
|
||||
</div>
|
||||
|
||||
<?php slot('after_select_appointment_provider'); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="unavailability-start" class="form-label">
|
||||
<?= lang('start') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="unavailability-start" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="unavailability-end" class="form-label">
|
||||
<?= lang('end') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="unavailability-end" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">
|
||||
<?= lang('timezone') ?>
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="border rounded d-flex justify-content-between align-items-center bg-light timezone-info">
|
||||
<div class="border-end w-50 p-1 text-center">
|
||||
<small>
|
||||
<?= lang('provider') ?>:
|
||||
<span class="provider-timezone">
|
||||
-
|
||||
</span>
|
||||
</small>
|
||||
</div>
|
||||
<div class="w-50 p-1 text-center">
|
||||
<small>
|
||||
<?= lang('current_user') ?>:
|
||||
<span>
|
||||
<?= $timezones[session('timezone', 'UTC')] ?>
|
||||
</span>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="unavailability-notes" class="form-label">
|
||||
<?= lang('notes') ?>
|
||||
</label>
|
||||
<textarea id="unavailability-notes" rows="3" class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<?php slot('after_primary_unavailability_fields'); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<?php slot('after_unavailability_actions'); ?>
|
||||
|
||||
<button class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('cancel') ?>
|
||||
</button>
|
||||
<button id="save-unavailability" class="btn btn-primary">
|
||||
<i class="fas fa-check-square me-2"></i>
|
||||
<?= lang('save') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php section('scripts'); ?>
|
||||
|
||||
<script src="<?= asset_url('assets/js/components/unavailabilities_modal.js') ?>"></script>
|
||||
|
||||
<?php end_section('scripts'); ?>
|
||||
@@ -0,0 +1,84 @@
|
||||
<div class="modal" id="working-plan-exceptions-modal">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><?= lang('working_plan_exception') ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="working-plan-exceptions-date"><?= lang('date') ?></label>
|
||||
<input class="form-control" id="working-plan-exceptions-date">
|
||||
</div>
|
||||
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" id="working-plan-exceptions-is-non-working-day">
|
||||
<label class="form-check-label" for="working-plan-exceptions-is-non-working-day">
|
||||
<?= lang('make_non_working_day') ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="working-plan-exceptions-start"><?= lang('start') ?></label>
|
||||
<input class="form-control" id="working-plan-exceptions-start">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="working-plan-exceptions-end"><?= lang('end') ?></label>
|
||||
<input class="form-control" id="working-plan-exceptions-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3><?= lang('breaks') ?></h3>
|
||||
|
||||
<p>
|
||||
<?= lang('add_breaks_during_each_day') ?>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-primary btn-sm working-plan-exceptions-add-break">
|
||||
<i class="fas fa-plus-square me-2"></i>
|
||||
<?= lang('add_break') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="table table-striped" id="working-plan-exceptions-breaks">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('start') ?></th>
|
||||
<th><?= lang('end') ?></th>
|
||||
<th><?= lang('actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><!-- Dynamic Content --></tbody>
|
||||
</table>
|
||||
|
||||
<?php slot('after_primary_working_plan_exception_fields'); ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<?php slot('before_working_plan_exception_actions'); ?>
|
||||
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<?= lang('cancel') ?>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="working-plan-exceptions-save">
|
||||
<i class="fas fa-check-square me-2"></i>
|
||||
<?= lang('save') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php section('scripts'); ?>
|
||||
|
||||
<script src="<?= asset_url('assets/js/components/working_plan_exceptions_modal.js') ?>"></script>
|
||||
|
||||
<?php end_section('scripts'); ?>
|
||||
Reference in New Issue
Block a user