From df6ab72d7478c2ccb0161830de5bf20e922cf3cb Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 30 Aug 2019 10:50:55 -0400 Subject: [PATCH] Start for adding light/dark theme Adding options for light dark top bottom --- models/adminServerStatsConfig.php | 6 +++-- models/frontCookiePopUp.php | 42 +++++++++++++++++++++++-------- views/adminServerStatsConfig.html | 16 ++++++++++++ 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/models/adminServerStatsConfig.php b/models/adminServerStatsConfig.php index 5e3749e..821e832 100755 --- a/models/adminServerStatsConfig.php +++ b/models/adminServerStatsConfig.php @@ -74,8 +74,10 @@ class adminServerStatsConfig extends glmServerStatsBandwidthSupport 'send_percent' => FILTER_VALIDATE_INT, 'show_notifications' => FILTER_VALIDATE_BOOLEAN, 'show_cookie_popup' => FILTER_VALIDATE_BOOLEAN, + 'show_bottom' => FILTER_VALIDATE_BOOLEAN, + 'show_dark_theme' => FILTER_VALIDATE_BOOLEAN, 'cookie_popup_timeout' => FILTER_VALIDATE_INT, - 'cookie_message' => FILTER_SANITIZE_STRING, + 'cookie_message' => FILTER_UNSAFE_RAW, 'cookie_opt_gdpr' => FILTER_VALIDATE_BOOLEAN, 'cookie_opt_access_logs' => FILTER_VALIDATE_BOOLEAN, 'cookie_opt_permanent' => FILTER_VALIDATE_BOOLEAN, @@ -164,4 +166,4 @@ class adminServerStatsConfig extends glmServerStatsBandwidthSupport } -?> \ No newline at end of file +?> diff --git a/models/frontCookiePopUp.php b/models/frontCookiePopUp.php index 562c69d..cc94712 100755 --- a/models/frontCookiePopUp.php +++ b/models/frontCookiePopUp.php @@ -1,18 +1,32 @@
Please read!
diff --git a/views/adminServerStatsConfig.html b/views/adminServerStatsConfig.html index c22e1aa..d8e861e 100755 --- a/views/adminServerStatsConfig.html +++ b/views/adminServerStatsConfig.html @@ -66,6 +66,22 @@ ]} {include file="ui/f6/number.html"} + {* Show Bottom *} + {$ui = [ + 'field' => 'show_bottom', + 'value' => {!empty($show_bottom)}, + 'label' => 'Show at the Bottom' + ]} + {include file="ui/f6/checkbox.html"} + + {* Theme Options Dark or Light *} + {$ui = [ + 'field' => 'show_dark_theme', + 'value' => {!empty($show_dark_theme)}, + 'label' => 'Show Dark Theme' + ]} + {include file="ui/f6/checkbox.html"} + {* cookie_message *} {$ui = [ 'field' => 'cookie_message', -- 2.17.1