Code

Added missing snapshot attribute
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Apr 2007 06:56:20 +0000 (06:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Apr 2007 06:56:20 +0000 (06:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5964 594d385d-05f5-0310-b6e9-bd551577e9d8

setup/class_setupStep6.inc
setup/setup_step6.tpl

index 2f978e1464477d4ea08ab2a46eab94ecdfd3e807..eb25438a7e7ac3c0ceccf6364e47d794717aaec3 100644 (file)
@@ -34,11 +34,12 @@ class setup_step_6 extends setup_step
                                   "minid_active"  => FALSE,
                                   "wws_ou"        => "ou=winstations",
                                   "wws_ou_active" => FALSE,
-                                  "snapshot_active"=> FALSE,
-                                  "snapshot_base" => "ou=snapshots,%base%",
-                                  "snapshot_user" => "cn=ldapadmin,%base%",
-                                  "snapshot_password" => "",
-                                  "snapshot_server"   => "%connection%");
+                                  "snapshot_active"     => FALSE,
+                                  "snapshot_base"       => "ou=snapshots,%base%",
+                                  "snapshot_ldap_base"  => "%base%",
+                                  "snapshot_user"       => "cn=ldapadmin,%base%",
+                                  "snapshot_password"   => "",
+                                  "snapshot_server"     => "%connection%");
 
   var $samba_settings    = array( "samba_sid"        => "0-815-4711",
                                   "samba_sid_active" => FALSE,
@@ -58,7 +59,7 @@ class setup_step_6 extends setup_step
   {
     /* Update snapshot values, with already collected values */
     foreach($this->generic_settings as $key => $value){
-      foreach(array("snapshot_base","snapshot_user","snapshot_server") as $attr){
+      foreach(array("snapshot_ldap_base","snapshot_base","snapshot_user","snapshot_server") as $attr){
         foreach($this->parent->captured_values as $replace_name => $replace_value){
           if(is_string($replace_value))  {
             $this->generic_settings[$attr] = preg_replace("/%".$replace_name."%/",$replace_value,$this->generic_settings[$attr]);
@@ -131,6 +132,9 @@ class setup_step_6 extends setup_step
         if(isset($_POST['snapshot_server'])){
           $this->generic_settings['snapshot_server'] = $_POST['snapshot_server'];
         }
+        if(isset($_POST['snapshot_ldap_base'])){
+          $this->generic_settings['snapshot_ldap_base'] = $_POST['snapshot_ldap_base'];
+        }
       }else{
         $this->generic_settings['snapshot_active'] = FALSE;
       }
index d67f255b9c2bc60775a393f89e4e3b5a3f84b22f..5c0c7b21270e619309a4b0a568d036f7feef078a 100644 (file)
                                                                changeState("snapshot_user");                                                   
                                                                changeState("snapshot_password");'>{t}Enable{/t}<br>
                 <div style='float:left;width:120px;'>
-                                       {t}Base{/t}&nbsp;
+                                       {t}Snapshot base{/t}&nbsp;
                                </div>
                                <input style='width:60%' id='snapshot_base' name='snapshot_base' 
                                        type='text' value='{$generic_settings.snapshot_base}' disabled><br>
+                <div style='float:left;width:120px;'>
+                   {t}Ldap base{/t}&nbsp;
+                               </div>
+                               <input style='width:60%' id='snapshot_ldap_base' name='snapshot_ldap_base' 
+                                       type='text' value='{$generic_settings.snapshot_ldap_base}' disabled><br>
                 <div style='float:left;width:120px;'>
                    {t}Server{/t}&nbsp;
                                </div>
             {else}
                 <input type='checkbox' value='1' name='snapshot_active' checked>{t}Enable{/t}<br>
                 <div style='float:left;width:120px;'>
-                   {t}Base{/t}&nbsp;
+                   {t}Snapshot base{/t}&nbsp;
                                </div>
                                <input style='width:60%' id='snapshot_base' name='snapshot_base' 
                                        type='text' value='{$generic_settings.snapshot_base}'><br>
+                <div style='float:left;width:120px;'>
+                   {t}Ldap base{/t}&nbsp;
+                               </div>
+                               <input style='width:60%' id='snapshot_ldap_base' name='snapshot_ldap_base' 
+                                       type='text' value='{$generic_settings.snapshot_ldap_base}'><br>
                 <div style='float:left;width:120px;'>
                        {t}Server{/t}&nbsp;
                                </div>