Code

* Fixed "add" buttons
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:12:38 +0000 (14:12 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:12:38 +0000 (14:12 +0000)
* Fixed error when pressing "add" without selecting something

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

gosa-plugins/goto/personal/environment/class_hotplugDialog.inc
gosa-plugins/goto/personal/environment/hotplugDialog.tpl
gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl

index b00281b8246ab07f468c8bc4e607ad1771f48e09..50e57194118ad639d44fef2c4c82fd968b5b1b36 100644 (file)
@@ -61,9 +61,12 @@ class hotplugDialog extends plugin
   function save()
   {
     $entries = array();
-    foreach($_POST['hotplugName'] as $name){
-      $entries[$name] = $this->hotplugDeviceList[$name];
+    if (isset($_POST['hotplugName'])){
+      foreach($_POST['hotplugName'] as $name){
+        $entries[$name] = $this->hotplugDeviceList[$name];
+      }
     }
+
     return $entries;
   }
 
index fd16778f06a65262ecd7d0b52496709ced5269ef..801421c6149404cd5369f31c39bbbe608fb61c27 100644 (file)
@@ -60,7 +60,7 @@
     <p class="seperator">&nbsp;</p>
 
     <p align="right">
-    <input type="submit" name="HotPlugSave"     value="{msgPool type=okButton}">
+    <input type="submit" name="HotPlugSave"     value="{msgPool type=addButton}">
     <input type="submit" name="HotPlugCancel"   value="{msgPool type=cancelButton}">
     </p>
 <script language="JavaScript" type="text/javascript">
index ed9dc189b99fff67ed48e210268bc0ce00c889bf..7c3033670a72a4b2a1a085ea456c0b2a4c63a8a5 100644 (file)
@@ -62,7 +62,7 @@
 
     <p class="seperator">&nbsp;</p>
     <p align="right">
-    <input type="submit" name="PrinterSave"     value="{msgPool type=okButton}">
+    <input type="submit" name="PrinterSave"     value="{msgPool type=addButton}">
     <input type="submit" name="PrinterCancel"   value="{msgPool type=cancelButton}">
     </p>
 <script language="JavaScript" type="text/javascript">