From 3a6babff54453060089e52619856e8735787c12c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 18 May 2010 14:46:17 +0000 Subject: [PATCH] Added a warning message for the property editor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18533 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../propertyEditor/class_propertyEditor.inc | 6 +++++ .../addons/propertyEditor/property-list.tpl | 26 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gosa-core/plugins/addons/propertyEditor/class_propertyEditor.inc b/gosa-core/plugins/addons/propertyEditor/class_propertyEditor.inc index 1af754774..4800151f7 100644 --- a/gosa-core/plugins/addons/propertyEditor/class_propertyEditor.inc +++ b/gosa-core/plugins/addons/propertyEditor/class_propertyEditor.inc @@ -60,6 +60,10 @@ class propertyEditor extends management $this->closeDialogs(); } + // Once accepted hide the warning message + if(isset($_POST['warningAccepted'])){ + $this->warningNotAccepted = TRUE; + } // Execute registered management event listeners. $this->handleActions($this->detectPostActions()); @@ -114,6 +118,8 @@ class propertyEditor extends management } } + $smarty = get_smarty(); + $smarty->assign("warningNotAccepted", $this->warningNotAccepted); return(management::execute()); } diff --git a/gosa-core/plugins/addons/propertyEditor/property-list.tpl b/gosa-core/plugins/addons/propertyEditor/property-list.tpl index 56368e1f2..9977bc92e 100644 --- a/gosa-core/plugins/addons/propertyEditor/property-list.tpl +++ b/gosa-core/plugins/addons/propertyEditor/property-list.tpl @@ -1,3 +1,27 @@ +{if !$warningNotAccepted} + + + + + + +
{image path='images/warning.png'} +

Attention

+

+ {t}Modifying properties may break your setup, destroy or mess up your ldap database, lead to security holes or it can even make logins impossible!{/t} + {t}Since configuration properties are stored in the ldap database a copy/backup can be handy.{/t} +

+
+
+ + {t}I know the risks and want to modify properties!{/t} +
+
+ +
+ +{else} +
@@ -39,4 +63,4 @@
- +{/if} -- 2.30.2