From 272109f6995044c492e4d2b80947a1e6f405e6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 17 Apr 2020 12:15:26 +0200 Subject: [PATCH] Custom js and css in client portal (#3638) --- app/DataMapper/CompanySettings.php | 9 +++++++++ resources/views/portal/ninja2020/layout/app.blade.php | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 4fcc144a53..aec8480033 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -226,6 +226,11 @@ class CompanySettings extends BaseSettings public $all_pages_footer = false; public $pdf_variables = ''; + public $portal_custom_head = ''; + public $portal_custom_css = ''; + public $portal_custom_footer = ''; + public $portal_custom_js = ''; + public static $casts = [ 'portal_design_id' => 'string', 'late_fee_endless_percent' => 'float', @@ -385,6 +390,10 @@ class CompanySettings extends BaseSettings 'design' => 'string', 'website' => 'string', 'pdf_variables' => 'object', + 'portal_custom_head' => 'string', + 'portal_custom_css' => 'string', + 'portal_custom_footer' => 'string', + 'portal_custom_js' => 'string', ]; /** diff --git a/resources/views/portal/ninja2020/layout/app.blade.php b/resources/views/portal/ninja2020/layout/app.blade.php index cf8bd60dac..f4f26ea353 100644 --- a/resources/views/portal/ninja2020/layout/app.blade.php +++ b/resources/views/portal/ninja2020/layout/app.blade.php @@ -56,9 +56,14 @@ + + {{-- Feel free to push anything to header using @push('header') --}} @stack('head') + {!! $client->getSetting('portal_custom_head') !!} @@ -70,6 +75,12 @@ + +