forked from mirrors/easyappointments
The theme variable can be changed by the "theme" query parameter for the booking page (#1205)
This commit is contained in:
parent
d82f95f0e3
commit
12df8420cb
2 changed files with 8 additions and 1 deletions
|
@ -132,6 +132,12 @@ class Booking extends EA_Controller {
|
|||
$display_login_button = setting('display_login_button');
|
||||
$display_delete_personal_information = setting('display_delete_personal_information');
|
||||
$book_advance_timeout = setting('book_advance_timeout');
|
||||
$theme = request('theme', setting('theme', 'default'));
|
||||
|
||||
if (empty($theme) || ! file_exists(__DIR__ . '/../../assets/css/themes/' . $theme . '.min.css'))
|
||||
{
|
||||
$theme = 'default';
|
||||
}
|
||||
|
||||
$timezones = $this->timezones->to_array();
|
||||
$grouped_timezones = $this->timezones->to_grouped_array();
|
||||
|
@ -223,6 +229,7 @@ class Booking extends EA_Controller {
|
|||
html_vars([
|
||||
'available_services' => $available_services,
|
||||
'available_providers' => $available_providers,
|
||||
'theme' => $theme,
|
||||
'company_name' => $company_name,
|
||||
'company_logo' => $company_logo,
|
||||
'company_color' => $company_color === '#ffffff' ? '' : $company_color,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/cookieconsent/cookieconsent.min.css') ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/themes/' . setting('theme', 'default') . '.css') ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/themes/' . vars('theme') . '.css') ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/booking_layout.css') ?>">
|
||||
|
||||
|
|
Loading…
Reference in a new issue