Code

Added edit locking to setup.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Dec 2007 13:04:43 +0000 (13:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Dec 2007 13:04:43 +0000 (13:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8014 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
setup/class_setupStep_Config3.inc
setup/setup_config3.tpl

index 97c6ad3c1ca333e59b9859585cfa9de2f876aa64..26a9ee26d23d1e947169d2346c1030778c7a3870 100644 (file)
                compressed="true"
 {else}
                compressed="false"
+{/if}
+{if $cv.optional.uniq_identifier_active }
+               uniq_identifier="{$cv.optional.uniq_identifier}"
+{else}
+               uniq_identifier=""
 {/if}
                lang="{$cv.lang_selected}"
                theme="{$cv.theme}"
index f0f30057c2e57cad7f5a8ce3fc5e9095446ac35a..eaa5368b1675414d929feabea7db604d65b7d880 100644 (file)
@@ -56,6 +56,9 @@ class Step_Config3 extends setup_step
               "notifydir" => "",
               "notifydir_active" => FALSE,
 
+              "uniq_identifier" => "entryCSN",
+              "uniq_identifier_active" => TRUE,
+
               "kioskpath" => "/var/spool/kiosk",
               "kioskpath_active" => FALSE,
 
@@ -84,6 +87,8 @@ class Step_Config3 extends setup_step
   {
     $smarty = get_smarty();
     $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
+    $smarty->assign("uniq_identifiers",array( "entryCNS" => "entryCSN",
+                                              "contextCSN"=>"contextCSN" ));
     $smarty->assign("optional", $this->optional);
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
@@ -172,6 +177,15 @@ class Step_Config3 extends setup_step
       }else{
         $this->optional['notifydir_active'] = FALSE;
       }
+
+      if(isset($_POST['uniq_identifier_active'])){
+        $this->optional['uniq_identifier_active'] = TRUE;
+        if(isset($_POST['uniq_identifier'])){
+          $this->optional['uniq_identifier'] = get_post('uniq_identifier');
+        }
+      }else{
+        $this->optional['uniq_identifier_active'] = FALSE;
+      }
     }
 
     $tmp = $this->check();
index 3093c34cbf2157309590cf496a5994e8e43c67fb..a3d2a55c39043fbd156f44ecd80c9844eaeafe52 100644 (file)
@@ -65,7 +65,8 @@
                     onClick='changeState("ppd_path");'>
                 <input size=40 id='ppd_path' name='ppd_path' type='text' value='{$optional.ppd_path}' disabled>
             {else}
-                <input type='checkbox' value='1' name='ppd_path_active' checked>
+                <input type='checkbox' value='1' name='ppd_path_active' checked
+                                       onClick='changeState("ppd_path");'>
                 <input size=40 id='ppd_path' name='ppd_path' type='text' value='{$optional.ppd_path}'  >
             {/if}
         </div>
@@ -82,7 +83,8 @@
                 <input size=40 id='kioskpath' name='kioskpath' 
                                        type='text' value='{$optional.kioskpath}' disabled>
             {else}
-                <input type='checkbox' value='1' name='kioskpath_active' checked>
+                <input type='checkbox' value='1' name='kioskpath_active' checked
+                                       onClick='changeState("kioskpath");'>
                 <input size=40 id='kioskpath' name='kioskpath' 
                                        type='text' value='{$optional.kioskpath}'  >
             {/if}
                 <input size=40 id='gotomasses_file' name='gotomasses_file' 
                                        type='text' value='{$optional.gotomasses_file}' disabled>
             {else}
-                <input type='checkbox' value='1' name='gotomasses_active' checked>
+                <input type='checkbox' value='1' name='gotomasses_active' checked
+                                       onClick='changeState("gotomasses_file");'>
                 <input size=40 id='gotomasses_file' name='gotomasses_file' 
                                        type='text' value='{$optional.gotomasses_file}'  >
             {/if}
                 <input size=40 id='auto_network_hook' name='auto_network_hook' 
                                        type='text' value='{$optional.auto_network_hook}' disabled>
             {else}
-                <input type='checkbox' value='1' name='auto_network_hook_active' checked>
+                <input type='checkbox' value='1' name='auto_network_hook_active' checked
+                                       onClick='changeState("auto_network_hook");'>
                 <input size=40 id='auto_network_hook' name='auto_network_hook' type='text' 
                                        value='{$optional.auto_network_hook}'  >
             {/if}
                 <input size=40 id='mailQueueScriptPath' name='mailQueueScriptPath' 
                                        type='text' value='{$optional.mailQueueScriptPath}' disabled>
             {else}
-                <input type='checkbox' value='1' name='mailQueueScriptPath_active' checked>
+                <input type='checkbox' value='1' name='mailQueueScriptPath_active' checked 
+                                       onClick='changeState("mailQueueScriptPath");'>
                 <input size=40 id='mailQueueScriptPath' name='mailQueueScriptPath' type='text' 
                                        value='{$optional.mailQueueScriptPath}'  >
             {/if}
                 <input size=40 id='notifydir' name='notifydir' 
                                        type='text' value='{$optional.notifydir}' disabled>
             {else}
-                <input type='checkbox' value='1' name='notifydir_active' checked>
+                <input type='checkbox' value='1' name='notifydir_active' checked 
+                                       onClick='changeState("notifydir");'>
                 <input size=40 id='notifydir' name='notifydir' 
                                        type='text' value='{$optional.notifydir}'  >
             {/if}
         </div>
     </div>
 
+    <div class='step4_container'>
+        <div class='step4_name'>
+            {t}Enable edit locking{/t}
+        </div>
+        <div class='step4_value'>
+            {if $optional.uniq_identifier_active == FALSE}
+                <input type='checkbox' value='1' name='uniq_identifier_active'
+                    onClick='changeState("uniq_identifier");'>
+                               <select name="uniq_identifier" id="uniq_identifier" disabled>
+                                       {html_options options=$uniq_identifiers selected=$optional.uniq_identifier}
+                               </select>
+            {else}
+                <input type='checkbox' value='1' name='uniq_identifier_active' checked
+                                       onClick='changeState("uniq_identifier");'>
+                               <select name="uniq_identifier" id="uniq_identifier" >
+                                       {html_options options=$uniq_identifiers selected=$optional.uniq_identifier}
+                               </select>
+            {/if}
+        </div>
+    </div>
+
     <p><b>{t}Login and session{/t}</b></p>
     <div class='step4_container'>
         <div class='step4_name'>