diff --git a/application/controllers/Appointments.php b/application/controllers/Appointments.php index ee886b55..27ad1deb 100755 --- a/application/controllers/Appointments.php +++ b/application/controllers/Appointments.php @@ -107,14 +107,14 @@ class Appointments extends EA_Controller { if (empty($results)) { - // The requested appointment doesn't exist in the database. Display a message to the customer. - $variables = [ + // The requested appointment was not found in the database. + $view = [ 'message_title' => lang('appointment_not_found'), 'message_text' => lang('appointment_does_not_exist_in_db'), 'message_icon' => base_url('assets/img/error.png') ]; - $this->load->view('appointments/message', $variables); + $this->load->layout('layouts/message/message_layout', 'pages/booking/booking_message_page', $view); return; } @@ -138,7 +138,7 @@ class Appointments extends EA_Controller { 'message_icon' => base_url('assets/img/error.png') ]; - $this->load->view('appointments/message', $view); + $this->load->layout('layouts/message/message_layout', 'pages/booking/booking_message_page', $view); return; } @@ -166,7 +166,7 @@ class Appointments extends EA_Controller { } // Load the book appointment view. - $variables = [ + $view = [ 'available_services' => $available_services, 'available_providers' => $available_providers, 'company_name' => $company_name, @@ -192,10 +192,10 @@ class Appointments extends EA_Controller { } catch (Throwable $e) { - $variables['exceptions'][] = $e; + $view['exceptions'][] = $e; } - $this->load->layout('layouts/booking/booking_layout', 'pages/booking/booking_page', $variables); + $this->load->layout('layouts/booking/booking_layout', 'pages/booking/booking_page', $view); } /** @@ -256,7 +256,7 @@ class Appointments extends EA_Controller { $view['exceptions'] = $exceptions; } - $this->load->view('appointments/message', $view); + $this->load->layout('layouts/message/message_layout', 'pages/booking/booking_message_page', $view); } /** diff --git a/application/views/appointments/message.php b/application/views/appointments/message.php deleted file mode 100644 index c725148d..00000000 --- a/application/views/appointments/message.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - <?= $message_title ?> | Easy!Appointments - - - - - - - - - - - - - - - - - -
-
-
-
- warning -
- -
-

- -

-
- -
- - Powered by - Easy!Appointments - -
-
-
-
- - - - diff --git a/application/views/layouts/message/message_layout.php b/application/views/layouts/message/message_layout.php new file mode 100644 index 00000000..64c9e40b --- /dev/null +++ b/application/views/layouts/message/message_layout.php @@ -0,0 +1,59 @@ + + + + + + + + + + + <?= $page_title ?> | Easy!Appointments + + + + + + + +
+
+
+ + + +
+ + Powered by + Easy!Appointments + +
+ +
+
+
+ + + + + + + + + + + + + + + diff --git a/application/views/pages/booking/booking_message_page.php b/application/views/pages/booking/booking_message_page.php new file mode 100644 index 00000000..99896f91 --- /dev/null +++ b/application/views/pages/booking/booking_message_page.php @@ -0,0 +1,19 @@ + + +
+ warning +
+ +
+

+ +

+
+ +