diff --git a/application/helpers/html_helper.php b/application/helpers/html_helper.php index 7fc46faa..6ac0fb8b 100644 --- a/application/helpers/html_helper.php +++ b/application/helpers/html_helper.php @@ -127,6 +127,42 @@ if ( ! function_exists('section')) } } +if ( ! function_exists('end_section')) +{ + /** + * Use this function in view files to mark the end of a layout section. + * + * Sections will only be used if the view file extends a layout and will be ignored otherwise. + * + * Example: + * + * + * + * + * + *

This is the content of the section.

+ * + * + * + * + * + * @param string $name + */ + function end_section(string $name) + { + $layout = config('layout'); + + if (array_key_exists($name, $layout['tmp'])) + { + $layout['sections'][$name][] = ob_get_clean(); + + unset($layout['tmp'][$name]); + + config(['layout' => $layout]); + } + } +} + if ( ! function_exists('slot')) { /** diff --git a/application/views/components/appointment_status_options.php b/application/views/components/appointment_status_options.php index 9a3957f6..5f5df474 100644 --- a/application/views/components/appointment_status_options.php +++ b/application/views/components/appointment_status_options.php @@ -19,4 +19,4 @@ - + diff --git a/application/views/components/appointments_modal.php b/application/views/components/appointments_modal.php index b72376cf..ea9844da 100644 --- a/application/views/components/appointments_modal.php +++ b/application/views/components/appointments_modal.php @@ -360,4 +360,4 @@ - + diff --git a/application/views/components/color_selection.php b/application/views/components/color_selection.php index 4cd60b77..3e076191 100644 --- a/application/views/components/color_selection.php +++ b/application/views/components/color_selection.php @@ -8,7 +8,7 @@ - + @@ -62,4 +62,4 @@ - + diff --git a/application/views/components/unavailabilities_modal.php b/application/views/components/unavailabilities_modal.php index 6e97baea..d3c3eed9 100644 --- a/application/views/components/unavailabilities_modal.php +++ b/application/views/components/unavailabilities_modal.php @@ -89,4 +89,4 @@ - + diff --git a/application/views/components/working_plan_exceptions_modal.php b/application/views/components/working_plan_exceptions_modal.php index 87bd0061..3a3ba72a 100644 --- a/application/views/components/working_plan_exceptions_modal.php +++ b/application/views/components/working_plan_exceptions_modal.php @@ -64,4 +64,4 @@ - + diff --git a/application/views/pages/about.php b/application/views/pages/about.php index 4685e788..5317a47c 100755 --- a/application/views/pages/about.php +++ b/application/views/pages/about.php @@ -95,4 +95,4 @@ - + diff --git a/application/views/pages/account.php b/application/views/pages/account.php index e35c7531..838a38dd 100644 --- a/application/views/pages/account.php +++ b/application/views/pages/account.php @@ -182,7 +182,7 @@ - + @@ -191,4 +191,4 @@ - + diff --git a/application/views/pages/admins.php b/application/views/pages/admins.php index d3ca9fa1..280c3f87 100755 --- a/application/views/pages/admins.php +++ b/application/views/pages/admins.php @@ -222,7 +222,7 @@ - + @@ -233,5 +233,5 @@ - + diff --git a/application/views/pages/api_settings.php b/application/views/pages/api_settings.php index 126d7b14..718b69b7 100644 --- a/application/views/pages/api_settings.php +++ b/application/views/pages/api_settings.php @@ -51,7 +51,7 @@ - + @@ -59,4 +59,4 @@ - + diff --git a/application/views/pages/booking.php b/application/views/pages/booking.php index b0c7a361..5003e3a9 100755 --- a/application/views/pages/booking.php +++ b/application/views/pages/booking.php @@ -47,7 +47,7 @@ 'display_privacy_policy' => vars('display_privacy_policy'), ]) ?> - + @@ -61,4 +61,4 @@ - + diff --git a/application/views/pages/booking_cancellation.php b/application/views/pages/booking_cancellation.php index 4b0c3eb5..ccfe6c93 100755 --- a/application/views/pages/booking_cancellation.php +++ b/application/views/pages/booking_cancellation.php @@ -19,12 +19,12 @@ - + vars('google_analytics_code')]) ?> vars('matomo_analytics_url')]) ?> - + diff --git a/application/views/pages/booking_confirmation.php b/application/views/pages/booking_confirmation.php index 3ebf2d1e..ce5e26ed 100755 --- a/application/views/pages/booking_confirmation.php +++ b/application/views/pages/booking_confirmation.php @@ -30,11 +30,11 @@ - + vars('google_analytics_code')]) ?> vars('matomo_analytics_url')]) ?> - + diff --git a/application/views/pages/booking_message.php b/application/views/pages/booking_message.php index 93b6c10c..9d8ffe7c 100644 --- a/application/views/pages/booking_message.php +++ b/application/views/pages/booking_message.php @@ -12,12 +12,12 @@

- + vars('google_analytics_code')]) ?> vars('matomo_analytics_url')]) ?> - + diff --git a/application/views/pages/booking_settings.php b/application/views/pages/booking_settings.php index 9a95db86..80394f2a 100755 --- a/application/views/pages/booking_settings.php +++ b/application/views/pages/booking_settings.php @@ -365,7 +365,7 @@ - + @@ -373,7 +373,7 @@ - + diff --git a/application/views/pages/business_settings.php b/application/views/pages/business_settings.php index f7fdfd61..e7b72779 100755 --- a/application/views/pages/business_settings.php +++ b/application/views/pages/business_settings.php @@ -123,7 +123,7 @@ - + @@ -136,5 +136,5 @@ - + diff --git a/application/views/pages/calendar.php b/application/views/pages/calendar.php index 5f2f71f6..b1043d79 100755 --- a/application/views/pages/calendar.php +++ b/application/views/pages/calendar.php @@ -109,7 +109,7 @@ - + @@ -130,5 +130,5 @@ - + diff --git a/application/views/pages/categories.php b/application/views/pages/categories.php index c4f09666..39d6d62d 100755 --- a/application/views/pages/categories.php +++ b/application/views/pages/categories.php @@ -82,7 +82,7 @@ - + @@ -92,4 +92,4 @@ - + diff --git a/application/views/pages/customers.php b/application/views/pages/customers.php index 4b8ad32f..8be7de24 100755 --- a/application/views/pages/customers.php +++ b/application/views/pages/customers.php @@ -198,7 +198,7 @@ - + @@ -209,4 +209,4 @@ - + diff --git a/application/views/pages/general_settings.php b/application/views/pages/general_settings.php index e536c580..67c348b4 100755 --- a/application/views/pages/general_settings.php +++ b/application/views/pages/general_settings.php @@ -200,7 +200,7 @@ - + @@ -208,4 +208,4 @@ - + diff --git a/application/views/pages/google_analytics_settings.php b/application/views/pages/google_analytics_settings.php index 025dff91..f84bfbdd 100644 --- a/application/views/pages/google_analytics_settings.php +++ b/application/views/pages/google_analytics_settings.php @@ -52,7 +52,7 @@ - + @@ -60,4 +60,4 @@ - + diff --git a/application/views/pages/integrations.php b/application/views/pages/integrations.php index 717748f6..b2f00303 100755 --- a/application/views/pages/integrations.php +++ b/application/views/pages/integrations.php @@ -113,5 +113,5 @@ - + diff --git a/application/views/pages/legal_settings.php b/application/views/pages/legal_settings.php index 9d7002df..c424bbc9 100755 --- a/application/views/pages/legal_settings.php +++ b/application/views/pages/legal_settings.php @@ -81,7 +81,7 @@ - + @@ -91,4 +91,4 @@ - + diff --git a/application/views/pages/login.php b/application/views/pages/login.php index 03499e88..c1bcda88 100644 --- a/application/views/pages/login.php +++ b/application/views/pages/login.php @@ -37,7 +37,7 @@ - + @@ -46,4 +46,4 @@ - + diff --git a/application/views/pages/logout.php b/application/views/pages/logout.php index 0ab9478e..4085a6e7 100644 --- a/application/views/pages/logout.php +++ b/application/views/pages/logout.php @@ -22,6 +22,6 @@ - + diff --git a/application/views/pages/matomo_analytics_settings.php b/application/views/pages/matomo_analytics_settings.php index 8e2bd483..9145df4d 100644 --- a/application/views/pages/matomo_analytics_settings.php +++ b/application/views/pages/matomo_analytics_settings.php @@ -52,7 +52,7 @@ - + @@ -60,4 +60,4 @@ - + diff --git a/application/views/pages/providers.php b/application/views/pages/providers.php index ff5ceb97..882fb0ca 100755 --- a/application/views/pages/providers.php +++ b/application/views/pages/providers.php @@ -355,7 +355,7 @@ - + @@ -371,7 +371,7 @@ - + diff --git a/application/views/pages/recovery.php b/application/views/pages/recovery.php index c47a245f..d73eaa88 100644 --- a/application/views/pages/recovery.php +++ b/application/views/pages/recovery.php @@ -41,7 +41,7 @@ - + @@ -51,4 +51,4 @@ - + diff --git a/application/views/pages/secretaries.php b/application/views/pages/secretaries.php index 2efa3cae..03114672 100755 --- a/application/views/pages/secretaries.php +++ b/application/views/pages/secretaries.php @@ -231,7 +231,7 @@ - + @@ -242,5 +242,5 @@ - + diff --git a/application/views/pages/services.php b/application/views/pages/services.php index b56851cd..5e344db6 100755 --- a/application/views/pages/services.php +++ b/application/views/pages/services.php @@ -166,7 +166,7 @@ - + @@ -177,4 +177,4 @@ - + diff --git a/application/views/pages/webhooks.php b/application/views/pages/webhooks.php index 7cdfaa21..ebcec0a6 100755 --- a/application/views/pages/webhooks.php +++ b/application/views/pages/webhooks.php @@ -141,7 +141,7 @@ - + @@ -151,4 +151,4 @@ - +