From f30d1f287f9d2b8f59a4efcb059048a6faeb5f3d Mon Sep 17 00:00:00 2001 From: Kutalo Alexey Date: Wed, 5 Sep 2018 22:51:40 -0300 Subject: [PATCH] Set contact info in system config --- config/system.php | 2 ++ .../js/views/configuration/system/System.vue | 12 ++++++++++ resources/assets/js/views/page/Form.vue | 24 +++++++++++++++++++ resources/assets/js/views/page/View.vue | 1 + resources/assets/js/views/post/View.vue | 1 + resources/assets/sass/app.scss | 4 ++++ resources/lang/en/configuration.php | 1 + resources/lang/ru/configuration.php | 1 + 8 files changed, 46 insertions(+) diff --git a/config/system.php b/config/system.php index a396d4b..4205d46 100755 --- a/config/system.php +++ b/config/system.php @@ -9,6 +9,7 @@ "page_length" => 50, "company_name" => "Spala", "company_description" => "A modern lightweight CMS for Laravel and Vue developers", + "contact_info" => "", "reset_password_token_lifetime" => 30, "lock_screen" => 0, "lock_screen_timeout" => 60, @@ -40,6 +41,7 @@ "page_length", "company_name", "company_description", + "contact_info", "maintenance_mode", "reset_password", "registration", diff --git a/resources/assets/js/views/configuration/system/System.vue b/resources/assets/js/views/configuration/system/System.vue index 8eb1e8e..b5bc787 100755 --- a/resources/assets/js/views/configuration/system/System.vue +++ b/resources/assets/js/views/configuration/system/System.vue @@ -143,6 +143,17 @@ +
+
+ + + + +
+
@@ -240,6 +251,7 @@ footer_credit: '', company_name: '', company_description: '', + contact_info: '', facebook_group: '', https: 0, multilingual: 0, diff --git a/resources/assets/js/views/page/Form.vue b/resources/assets/js/views/page/Form.vue index 9dd792c..35f0437 100755 --- a/resources/assets/js/views/page/Form.vue +++ b/resources/assets/js/views/page/Form.vue @@ -79,6 +79,7 @@ }, methods: { submit() { + this.pageForm.body = this.cleanHTML(this.pageForm.body); this.pageForm.body = this.addAttributes(this.pageForm.body); this.pageForm.post('/api/page/new') .then(response => { @@ -89,6 +90,29 @@ helper.showErrorMsg(error); }) }, + cleanHTML(bodyHtml) { + let stringStripper = /(\n|\r| class=(")?Mso[a-zA-Z]+(")?)/g; + let output = bodyHtml.replace(stringStripper, ' '); + let commentStripper = new RegExp('', 'g'); + output = output.replace(commentStripper, ''); + let allowedTags = [ + '

', '

', '

', '

', '

', '
', '

', '
', '

', '', + '