summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de73151)
raw | patch | inline | side by side (parent: de73151)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Jan 2006 09:46:34 +0000 (09:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Jan 2006 09:46:34 +0000 (09:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2535 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_glpiPrinterAccount.inc | patch | blob | history | |
plugins/admin/systems/glpiPrinter.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_glpiPrinterAccount.inc b/plugins/admin/systems/class_glpiPrinterAccount.inc
index c6f3f281da4c3578ee2ea983076288b8c49b998d..2fbffd147c576f7b3b8ebf3862c14208c693cae2 100644 (file)
/* Remove cartridge
*/
if((isset($_POST['RemoveCartridge']))&&(isset($_POST['Cartridges']))){
- if(isset($this->usedCartridges[$_POST['Cartridges']])){
- if($this->usedCartridges[$_POST['Cartridges']]['status'] == "exists"){
- $this->usedCartridges[$_POST['Cartridges']]['status'] = "deleted";
- }else{
- unset($this->usedCartridges[$_POST['Cartridges']]);
+
+ foreach($_POST['Cartridges'] as $cartID){
+
+ if(isset($this->usedCartridges[$cartID])){
+ if($this->usedCartridges[$cartID]['status'] == "exists"){
+ $this->usedCartridges[$cartID]['status'] = "deleted";
+ }else{
+ unset($this->usedCartridges[$cartID]);
+ }
}
}
}
$smarty->assign("tech_num", _("N/A"));
}
+ /* If theres a cartridge selected, you can't change the printer type.
+ */
+ $disp = true;
+
+ foreach($this->usedCartridges as $cart){
+ if($cart['status'] != "deleted"){
+ $disp = false;
+ }
+ }
+ if($disp==false){
+ $smarty->assign("typeACL","disabled");
+ }
+
$display.= $smarty->fetch(get_template_path('glpiPrinter.tpl', TRUE));
return($display);
}
index 054217bc1f22e252c6157fed7ed48092a84fa543..835a00eca76a3cce466c2be5640ac494d8303b0e 100644 (file)
<table summary="" width="100%">
<tr>
<td>
- <select name="Cartridges" {$CartridgesACL} style="height:100px;width:100%;" multiple>
+ <select name="Cartridges[]" {$CartridgesACL} style="height:100px;width:100%;" multiple>
{html_options values=$CartridgeKeys output=$Cartridges}
</select>
<input name="AddCartridge" value="{t}Add{/t}" type="submit">