Code

Fixed layout for object groups
[gosa.git] / plugins / gofax / faxaccount / class_gofaxAccount.inc
index 7a2296292233f3dfd352a07f314238fadce2d70e..d11c1eae760f773a8546c9a86423d0c2894ced56 100644 (file)
@@ -96,6 +96,8 @@ class gofaxAccount extends plugin
     } elseif ( !$this->parent->by_object['mailAccount']->is_account){
       $smarty->assign("has_mailaccount", "false");
       $this->has_mailAccount= false;
+    } else {
+      $smarty->assign("has_mailaccount", "true");
     }
 
     /* Do we need to flip is_account state? */
@@ -105,7 +107,7 @@ class gofaxAccount extends plugin
 
     /* Do we represent a valid account? */
     if (!$this->is_account && $this->parent == NULL){
-      $display= "<img src=\"images/stop.png\" align=center>&nbsp;<b>".
+      $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\">&nbsp;<b>".
         _("This account has no fax extensions.")."</b>";
       $display.= back_to_main();
       return ($display);
@@ -345,9 +347,15 @@ class gofaxAccount extends plugin
       $smarty->assign("goFaxBlockListACL", chkacl($this->acl, "goFaxBlockList"));
       $smarty->assign("departments", $this->config->idepartments);
       $smarty->assign("list", $list);
+      
       if (isset($_POST['department'])){
         $smarty->assign("department", $_POST['department']);
+      } else {
+        $smarty->assign("department", "");
       }
+
+
+
       $display.= $smarty->fetch (get_template_path('lists.tpl', TRUE, dirname(__FILE__)));
       return ($display);
     }
@@ -371,7 +379,11 @@ class gofaxAccount extends plugin
       $smarty->assign("list", $list);
       if (isset($_POST['department'])){
         $smarty->assign("department", $_POST['department']);
+      } else {
+        $smarty->assign("department", "");
       }
+
       $display.= $smarty->fetch (get_template_path('lists.tpl', TRUE, dirname(__FILE__)));
       return ($display);
     }
@@ -410,6 +422,8 @@ class gofaxAccount extends plugin
     } else {
       $smarty->assign("fax_to_printer", "");
     }
+
+
     $display.= $smarty->fetch (get_template_path('generic.tpl', TRUE, dirname(__FILE__)));
     return ($display);
   }
@@ -470,6 +484,11 @@ class gofaxAccount extends plugin
         $message[]= _("The mail address you've entered is invalid.");
       }
     }
+    // IE Fix, IE lets you choose disabled option, stupid browser ... 
+    if((empty($this->goFaxPrinter))&&($this->goFaxDeliveryMode & 64)){
+      $message[]= _("Deliver fax to printer, is only possible if valid printer is given. Please correct your choice.");
+    }
 
     return ($message);
   }