Prechádzať zdrojové kódy

add mail forwarding

andre 1 rok pred
rodič
commit
e634093a4a

+ 6 - 3
app/UI/Client/EmailAccount/Providers/EditAccountDataProvider.php

@@ -115,10 +115,13 @@ class EditAccountDataProvider extends BaseDataProvider
         {
             $value = in_array($field, $fieldToProtection) ? htmlentities($value) : $value;
         }
-        if ($this->formData['forward'] == 'on') {
-            $this->formData['zimbraPrefMailLocalDeliveryDisabled'] = TRUE;
-        } else {
+        if (empty($this->formData['target'])) {
             $this->formData['zimbraPrefMailLocalDeliveryDisabled'] = FALSE;
+            $this->formData['zimbraPrefMailForwardingAddress'] = NULL;
+        } else {
+            $this->formData['zimbraPrefMailLocalDeliveryDisabled'] = TRUE;
+            $this->formData['zimbraPrefMailForwardingAddress'] = $this->formData['target'];
+            unset($this->formData['target']);
         }
         /**
          * product manager allow to check product settings