Code

Dialog unifying
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:27:17 +0000 (14:27 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:27:17 +0000 (14:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10062 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mailAccount.inc
gosa-plugins/mail/personal/mail/mail_locals.tpl

index 6a5c47c2fa2162269269f3521d4f256e791076f9..b4a2eae8090c42b72827a6f0d4d1a60369731ecd 100644 (file)
@@ -327,21 +327,26 @@ class mailAccount extends plugin
     /* Finished adding of locals? */
     if (isset($_POST['add_locals_finish'])){
 
-      /* Check if we are able to write gosaMailForwardingAddress */
-      if($this->acl_is_writeable("gosaMailForwardingAddress")){
+      if (isset($_POST['local_list'])){
 
-        /* Walk through list of forwarders, ignore own addresses */
-        foreach ($_POST['local_list'] as $val){
-          if (!in_array ($val, $this->gosaMailAlternateAddress) &&
-              $val != $this->mail){
+        /* Check if we are able to write gosaMailForwardingAddress */
+        if($this->acl_is_writeable("gosaMailForwardingAddress")){
 
-            $this->addForwarder($val);
-            $this->is_modified= TRUE;
+          /* Walk through list of forwarders, ignore own addresses */
+          foreach ($_POST['local_list'] as $val){
+            if (!in_array ($val, $this->gosaMailAlternateAddress) &&
+                $val != $this->mail){
+
+              $this->addForwarder($val);
+              $this->is_modified= TRUE;
+            }
           }
         }
+        $this->forward_dialog= FALSE;
+        $this->dialog= FALSE;
+      } else {
+        msg_dialog::display(_("Error"), _("Please select an entry!"), ERROR_DIALOG);
       }
-      $this->forward_dialog= FALSE;
-      $this->dialog= FALSE;
     }
 
     /* Add forward email addresses */
index a06a98e08d72ad2b43de5045a22110093d597256..686c7395f3cae71070fd8fbb9c1ba14ced1e9c56 100644 (file)
@@ -1,6 +1,6 @@
 <table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
   <tr>
-    <td style="vertical-align:top;width:600px">
+    <td style="vertical-align:top;">
       <div class="contentboxh" style="height:20px;">
         <p class="contentboxh" style="font-size:12px">
           <b>
       </div>
       <div class="contentboxb">
         <p class="contentboxb" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
-          <select id="local_list" style="width:600px; margin-top:4px; height:450px;" name="local_list[]" size="15" multiple>
+          <select id="local_list" style="width:100%; margin-top:4px; height:450px;" name="local_list[]" size="15" multiple>
                  {html_options options=$mailusers}
           </select>
         </p>
       </div>
     </td>
-    <td style="vertical-align:top;">
+    <td style="vertical-align:top;width:350px">
       <div class="contentboxh" style="height:20px;">
         <p class="contentboxh" style="font-size:12px">
           <img src="{$launchimage}" align="right" alt="[F]">