瀏覽代碼

edit mailinglists

andre 2 年之前
父節點
當前提交
afe0140982

+ 14 - 4
app/UI/Client/DistributionList/Providers/EditListDataProvider.php

@@ -104,8 +104,20 @@ class EditListDataProvider extends AddListDataProvider
 
 
         $this->data['id'] = $list[0]['id'];
         $this->data['id'] = $list[0]['id'];
 
 
-        $this->data['listmail'] = $list[0]['name'];
-        $this->data['domain']   = $this->getWhmcsParamByKey('domain');
+        $this->data['listmail']     = $list[0]['name'];
+        $this->data['domain']       = $this->getWhmcsParamByKey('domain');
+        $this->data['description']  = $list[0]['description'];
+        $this->data['lang']         = $list[0]['languageId'];
+
+        /**
+         * subscription requests
+         */
+        $this->data['subscriptionRequest'] = $list[0]['subscription']['type'];
+        $this->availableValues['subscriptionRequest'] = [
+            Kerio::STATUS_REJECT   => $lang->absoluteT('Automatically reject'),
+            Kerio::STATUS_APPROVAL => $lang->absoluteT('Require moderator approval'),
+            Kerio::STATUS_ACCEPT   => $lang->absoluteT('Automatically accept')
+        ];
 
 
         /**
         /**
          * allow to check which should be removed
          * allow to check which should be removed
@@ -114,8 +126,6 @@ class EditListDataProvider extends AddListDataProvider
 //        $this->availableValues['emailAliasesActually'] = $this->data['emailAliasesActually']    = $list->getResourceAliases();
 //        $this->availableValues['emailAliasesActually'] = $this->data['emailAliasesActually']    = $list->getResourceAliases();
 //        $this->availableValues['ownersActually']       = $this->data['ownersActually']          = $list->getResourceOwners();
 //        $this->availableValues['ownersActually']       = $this->data['ownersActually']          = $list->getResourceOwners();
 
 
-//        $this->data['displayName']           = $list->getDataResourceA(DistributionList::ATTR_DISPLAY_NAME);
-//        $this->data['description']           = $list->getDataResourceA(DistributionList::ATTR_DESCRIPTION);
 //        $this->data['subscriptionRequest']   = $list->getDataResourceA(DistributionList::ATTR_SUBSCRIPTION_REQUEST);
 //        $this->data['subscriptionRequest']   = $list->getDataResourceA(DistributionList::ATTR_SUBSCRIPTION_REQUEST);
 //        $this->data['unsubscriptionRequest'] = $list->getDataResourceA(DistributionList::ATTR_UNSUBSCRIPTION_REQUEST);
 //        $this->data['unsubscriptionRequest'] = $list->getDataResourceA(DistributionList::ATTR_UNSUBSCRIPTION_REQUEST);
 //        $this->data['replyDisplayName']      = $list->getDataResourceA(DistributionList::REPLY_TO_DISPLAY);
 //        $this->data['replyDisplayName']      = $list->getDataResourceA(DistributionList::REPLY_TO_DISPLAY);

+ 0 - 2
app/UI/Client/DistributionList/Sections/EditMembersDistribution.php

@@ -39,8 +39,6 @@ class EditMembersDistribution extends FreeFieldsSection
         $email->addInputComponent((new InputText('domain'))->addHtmlAttribute('readonly','true'));
         $email->addInputComponent((new InputText('domain'))->addHtmlAttribute('readonly','true'));
         $this->addSection($email);
         $this->addSection($email);
 
 
-        $this->addField((new Text('displayName')));
-
         $this->addField(new Textarea('description'));
         $this->addField(new Textarea('description'));
 
 
         $this->addField((new Select('memberList'))->enableMultiple());
         $this->addField((new Select('memberList'))->enableMultiple());