Code

Some changes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 Jan 2006 11:17:14 +0000 (11:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 Jan 2006 11:17:14 +0000 (11:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2536 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_glpiAccount.inc
plugins/admin/systems/glpi.tpl
plugins/admin/systems/glpiAttachmentPool.tpl
plugins/admin/systems/glpiDeviceManagement.tpl

index 43af3cd0948656358fc6ae354ef6e4032245c140..1f3cb999c205533381d04440a6c9d7ff676c7f96 100644 (file)
@@ -11,7 +11,7 @@ class glpiAccount extends plugin
   var $ignore_account= FALSE;
   var $attributes= array("ID","name","contact",
       "tech_num","comments","date_mod","os","location","domain","network","contact_num",
-      "model","type","is_template","FK_glpi_enterprise","deleted","InstalledDevices","Attachments");
+      "model","type","is_template","FK_glpi_enterprise","deleted");
 
   var $ID                 ;       // Is set if this entry is edited 
   var $name               = "";    // This should be the dn of this entry 
@@ -225,8 +225,10 @@ class glpiAccount extends plugin
     /* Remove Attachment fro this tab 
      */
     if((isset($_POST['RemoveAttachment']))&&(isset($_POST['Attachments']))){
-      if(isset($this->usedAttachments[$_POST['Attachments']])){
-        unset($this->usedAttachments[$_POST['Attachments']]);
+      foreach($_POST['Attachments'] as $entry){
+        if(isset($this->usedAttachments[$entry])){
+          unset($this->usedAttachments[$entry]);
+        }
       }
     }
 
@@ -436,7 +438,7 @@ class glpiAccount extends plugin
 
     /* Assign some vars to smarty 
      */
-    foreach(array("type","FK_glpi_enterprise","os","tech_num","contact_num") as $attr){
+    foreach(array("type","FK_glpi_enterprise","os","tech_num","contact_num","Attachments","InstalledDevices") as $attr){
       $smarty->assign($attr,"");
       $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
     }
index 7e13cfd8a0fbbf5f798b9c70a2070655af3ba2d0..1cf9da4ee2addc1a2590a31453c435ccc748ccf2 100644 (file)
@@ -88,7 +88,7 @@
                        <table summary="" width="100%"> 
                                <tr>
                                        <td>
-                                               <select name="Attachments" {$AttachmentsACL} style="height:120px;width:100%;" multiple>
+                                               <select name="Attachments[]" {$AttachmentsACL} style="height:120px;width:100%;" multiple>
                                                        {html_options values=$AttachmentKeys output=$Attachments}
                                                </select>
                                                <input name="AddAttachment"     value="{t}Add{/t}" type="submit" {$AttachmentsACL}>     
index 91369ad2a63a73e5fd5be23a1f628cf998aea72a..d19f4f815f5ef286601f0ea9fa7539f50e99c350 100644 (file)
@@ -50,7 +50,7 @@
 <p class="seperator">&nbsp;</p>
 <div align="right">
        <p>
-       <input type="submit" name="UseAttachment" value="{t}Use{/t}">
-       <input type="submit" name="AbortAttachment" value="{t}Cancel{/t}">
+               <input type="submit" name="UseAttachment" value="{t}Use{/t}">
+               <input type="submit" name="AbortAttachment" value="{t}Cancel{/t}">
        </p>
 </div>
index e25018a6ce17b47517842a54b54fcd2e23187dac..fbaee892e902c9cb8b711abfe34ba2aa7d142d02 100644 (file)
@@ -49,6 +49,8 @@
 <input type="hidden" name="ignore">
 <p class="seperator">&nbsp;</p>
 <div align="right">
-       <input type="submit" name="SelectDeviceSave" value="{t}Use{/t}">
-       <input type="submit" name="SelectDeviceCancel" value="{t}Cancel{/t}">
+       <p>
+               <input type="submit" name="SelectDeviceSave" value="{t}Use{/t}">
+               <input type="submit" name="SelectDeviceCancel" value="{t}Cancel{/t}">
+       </p>
 </div>