Code

Added a warning message for the property editor
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 May 2010 14:46:17 +0000 (14:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 May 2010 14:46:17 +0000 (14:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18533 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/addons/propertyEditor/class_propertyEditor.inc
gosa-core/plugins/addons/propertyEditor/property-list.tpl

index 1af754774d85d70ed6ed24fdd036bce5be1da3c6..4800151f7c29304750d2c0282f7499c0259e3b5c 100644 (file)
@@ -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());
     }
 
index 56368e1f2a5c6a682ce89a263f20eaaa7544d075..9977bc92edf9fe40c925570a2feb9e024164f2a0 100644 (file)
@@ -1,3 +1,27 @@
+{if !$warningNotAccepted}
+
+    <table summary="{t}Warning message{/t}" style='width:100%'>
+     <tr>
+      <td style='padding: 10px;'>{image path='images/warning.png'}</td>
+      <td>
+        <h3>Attention</h3>
+       <p>
+        {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}
+       </p>
+      </td> 
+     </tr>
+    </table>
+    <hr>
+      <input type='checkbox' name='warningAccepted' value='1'>
+        {t}I know the risks and want to modify properties!{/t}
+    <hr>
+    <div class="plugin-actions">
+        <button name='goOn'>{msgPool type='okButton'}</button> 
+    </div>
+
+{else}
+
 <script language="javascript" src="include/tooltip.js" type="text/javascript"></script>
 
 <div id="mainlist">
@@ -39,4 +63,4 @@
     <button name='saveProperties'>{msgPool type='okButton'}</button>
     <button name='cancelProperties'>{msgPool type='cancelButton'}</button>
 </div>
-
+{/if}