Code

Updated samba handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Nov 2008 13:40:46 +0000 (13:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Nov 2008 13:40:46 +0000 (13:40 +0000)
-sambaHomeDrive can be empty.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13046 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/personal/samba/class_sambaAccount.inc
gosa-plugins/samba/personal/samba/samba3.tpl

index 42b84c08993c59ae1c06355bf24b340baf9456c2..e366f9848fc1296e43d19c208b229a815dfa677d 100644 (file)
@@ -508,7 +508,7 @@ class sambaAccount extends plugin
       }
       $smarty->assign("domains", $domains);
     }
-    $letters= array();
+    $letters= array("");
     for ($i= 68; $i<91; $i++){
       $letters[]= chr($i).":";
     }
@@ -750,6 +750,14 @@ class sambaAccount extends plugin
 
     if ($this->samba3){
 
+      /* sambaHomePath requires sambaHomeDrive and vice versa */
+      if(!empty($this->sambaHomePath) && empty($this->sambaHomeDrive)){
+        $message[]= msgPool::required(_("Home drive"));
+      }
+      if(!empty($this->sambaHomeDrive) && empty($this->sambaHomePath)){
+        $message[]= msgPool::required(_("Home path"));
+      }
+
       /* Strings */
       foreach (array( "sambaHomePath" => _("Home directory"),
             "sambaProfilePath" => _("Profile path")) as $key => $val){
index 64ee0a3b18426e2ca786f1335ab9b450a03f0c89..aecc65815f8fb41725e94af72b21d1fe20f68271 100644 (file)
@@ -17,7 +17,6 @@
 {/render}
 {render acl=$sambaHomeDriveACL  checkbox=$multiple_support checked=$use_sambaHomeDrive}
       <select size="1" name="sambaHomeDrive">
-       <option disabled>&nbsp;</option>
        {html_options values=$drives output=$drives selected=$sambaHomeDrive}
       </select>
 {/render}
 {/render}
 {render acl=$AllowLoginOnTerminalServerACL  checkbox=$multiple_support checked=$use_CtxWFHomeDirDrive}
       <select size="1" id="CtxWFHomeDirDrive" name="CtxWFHomeDirDrive"  {$tsloginstate}>
-       <option disabled>&nbsp;</option>
        {html_options values=$drives output=$drives selected=$CtxWFHomeDirDrive}
       </select>
 {/render}