Code

Updated samba Account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Nov 2008 13:50:35 +0000 (13:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Nov 2008 13:50:35 +0000 (13:50 +0000)
-sambaHomePath and Drive can be empty.

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

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

index 44b8c1814ba620dcca401efde9e9609dffcb9c36..e596081a2a48b60c0b1941dec28642094a288013 100644 (file)
@@ -467,7 +467,7 @@ class sambaAccount extends plugin
       }
       $smarty->assign("domains", $domains);
     }
-    $letters= array();
+    $letters= array("");
     for ($i= 68; $i<91; $i++){
       $letters[]= chr($i).":";
     }
@@ -698,6 +698,14 @@ class sambaAccount extends plugin
 
     if ($this->samba3){
 
+      /* sambaHomePath requires sambaHomeDrive and vice versa */
+      if(!empty($this->sambaHomePath) && empty($this->sambaHomeDrive)){
+        $message[]= sprintf(_("Please select a value for 'Home drive'."));
+      }
+      if(!empty($this->sambaHomeDrive) && empty($this->sambaHomePath)){
+        $message[]= sprintf(_("Please specify a value for 'Home path'."));
+      }
+
       /* Strings */
       foreach (array( "sambaHomePath" => _("Home directory"),
             "sambaProfilePath" => _("Profile path")) as $key => $val){
index 0c07033a0e9fa04189f422211ce655ed86446af8..2bfcf20932999a1b4caf8112aaea6c38fc48085f 100644 (file)
@@ -14,7 +14,6 @@
      <td>
       <input id="sambaHomePath" name="sambaHomePath" size=30 maxlength=60 {$sambaHomePathACL} value="{$sambaHomePath}">
       <select size="1" name="sambaHomeDrive" {$sambaHomeDriveACL}>
-       <option disabled>&nbsp;</option>
        {html_options values=$drives output=$drives selected=$sambaHomeDrive}
       </select>
      </td>
@@ -95,7 +94,6 @@
      <td>
       <input id="CtxWFHomeDir" name="CtxWFHomeDir" size=30 maxlength=60 {$CtxWFHomeDirACL} value="{$CtxWFHomeDir}" {$tsloginstate}>
       <select size="1" id="CtxWFHomeDirDrive" name="CtxWFHomeDirDrive" {$CtxWFHomeDirDriveACL} {$tsloginstate}>
-       <option disabled>&nbsp;</option>
        {html_options values=$drives output=$drives selected=$CtxWFHomeDirDrive}
       </select>
      </td>