From 9f5bc33c943349bd765b991db0b7f6b6ef05cfdb Mon Sep 17 00:00:00 2001 From: Remigijus Kiminas Date: Wed, 26 Jan 2022 00:49:34 -0500 Subject: [PATCH] CSRF For personal theme --- .../defaulttheme/js/admintheme.form.angular.js | 12 ++++++++++++ .../tpl/lhkernel/validation_error.tpl.php | 2 +- .../tpl/lhtheme/admin/form.tpl.php | 18 +++++++++++++++++- .../tpl/lhtheme/personaltheme.tpl.php | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lhc_web/design/defaulttheme/js/admintheme.form.angular.js b/lhc_web/design/defaulttheme/js/admintheme.form.angular.js index 3e1a314d38..8284df78f6 100644 --- a/lhc_web/design/defaulttheme/js/admintheme.form.angular.js +++ b/lhc_web/design/defaulttheme/js/admintheme.form.angular.js @@ -91,5 +91,17 @@ lhcAppControllers.controller('IClickToCallFormGenerator',['$scope','$http','$loc }); delete that.staticCSSResources[field.hash]; }; + + this.initVariables = function () { + if (window.PersonalTheme.staticResources) { + this.staticResources = window.PersonalTheme.staticResources; + } + if (window.PersonalTheme.staticJSResources) { + this.staticJSResources = window.PersonalTheme.staticJSResources; + } + if (window.PersonalTheme.staticCSSResources) { + this.staticCSSResources = window.PersonalTheme.staticCSSResources; + } + } }]); \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/tpl/lhkernel/validation_error.tpl.php b/lhc_web/design/defaulttheme/tpl/lhkernel/validation_error.tpl.php index 7f9afb6d2b..6aa93598a8 100644 --- a/lhc_web/design/defaulttheme/tpl/lhkernel/validation_error.tpl.php +++ b/lhc_web/design/defaulttheme/tpl/lhkernel/validation_error.tpl.php @@ -1,5 +1,5 @@ -
+