summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a4d888)
raw | patch | inline | side by side (parent: 5a4d888)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 May 2006 09:18:50 +0000 (09:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 May 2006 09:18:50 +0000 (09:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3539 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationStartup.inc | patch | blob | history | |
plugins/admin/systems/workstationStartup.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index cf53ff2725840c274ab474c3c85a782d58ffbfd4..5f1952d128732bf6e32faf61ed168ae786060c1e 100644 (file)
if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){
print_red(_("You must specify a valid mount point."));
}else{
- $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
- $s_mount = $_POST['gotoShareMountPoint'];
- /* Preparing the new assignment */
- $this->gotoShares[$a_share['name']."|".$a_share['server']]=$a_share;
- $this->gotoShares[$a_share['name']."|".$a_share['server']]['mountPoint']=$s_mount;
+ if(count($this->gotoAvailableShares)){
+ $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
+ $s_mount = $_POST['gotoShareMountPoint'];
+ /* Preparing the new assignment */
+ $this->gotoShares[$a_share['name']."|".$a_share['server']]=$a_share;
+ $this->gotoShares[$a_share['name']."|".$a_share['server']]['mountPoint']=$s_mount;
+ }
}
}
}
$smarty->assign("gotoShares",$this->printOutAssignedShares());
+ $smarty->assign("gotoSharesCount",count($this->printOutAssignedShares()));
$smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares()));
$smarty->assign("gotoBootKernels",$this->gotoBootKernels);
diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl
index 9466a5092669c249a311c3f9efd432bd8d20edcc..7c4c25397b5b4ca7a668d43cb64eb196835a588d 100644 (file)
<tr>
<td>
<select style="width:100%;height:150px;" name="gotoShare" multiple size=4 {$gotoShareACL} id="gotoShare">
- {html_options values=$gotoShareKeys output=$gotoShares}
- <option disabled> </option>
+ {html_options values=$gotoShareKeys output=$gotoShares}
+ <option disabled> </option>
</select>
<br>
<select name="gotoShareSelection" {$gotoShareACL}>
- {html_options values=$gotoShareSelectionKeys output=$gotoShareSelections}
- <option disabled> </option>
+ {html_options values=$gotoShareSelectionKeys output=$gotoShareSelections}
+ <option disabled> </option>
</select>
<input type="text" size=15 {$gotoShareACL} name="gotoShareMountPoint" value="{t}Mountpoint{/t}">
<input type="submit" {$gotoShareACL} name="gotoShareAdd" value="{t}Add{/t}">
- <input type="submit" {$gotoShareACL} name="gotoShareDel" value="{t}Remove{/t}">
+ <input type="submit" {$gotoShareACL} name="gotoShareDel" value="{t}Remove{/t}" {if $gotoSharesCount == 0} disabled {/if}>
</td>
</tr>
</table>