|
|
@@ -122,18 +122,14 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
$this->data['status'] = $account['isEnabled'];
|
|
|
$this->data['company'] = $address['contacts'][0]['companyName'];
|
|
|
$this->data['title'] = $address['contacts'][0]['titleBefore'];
|
|
|
- $this->data['home_phone'] = $address['contacts'][0]['phoneNumberWorkVoice'];
|
|
|
+ $this->data['work_phone'] = $address['contacts'][0]['phoneNumberWorkVoice'];
|
|
|
$this->data['mobile_phone'] = $address['contacts'][0]['phoneNumberMobile'];
|
|
|
$this->data['department'] = $address['contacts'][0]['departmentName'];
|
|
|
$this->data['profession'] = $address['contacts'][0]['profession'];
|
|
|
$lang = di('lang');
|
|
|
$this->availableValues['status'] = [
|
|
|
Kerio::ACC_STATUS_ACTIVE => $lang->absoluteT('kerio','account','status','active'),
|
|
|
- Kerio::ACC_STATUS_LOCKED => $lang->absoluteT('kerio','account','status','locked'),
|
|
|
- Kerio::ACC_STATUS_MAINTENANCE => $lang->absoluteT('kerio','account','status','maintenance'),
|
|
|
- Kerio::ACC_STATUS_CLOSED => $lang->absoluteT('kerio','account','status','closed'),
|
|
|
- Kerio::ACC_STATUS_LOCKOUT => $lang->absoluteT('kerio','account','status','lockout'),
|
|
|
- Kerio::ACC_STATUS_PENDING => $lang->absoluteT('kerio','account','status','pending')
|
|
|
+ Kerio::ACC_STATUS_CLOSED => $lang->absoluteT('kerio','account','status','closed')
|
|
|
];
|
|
|
|
|
|
}
|
|
|
@@ -149,7 +145,7 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
$hid = $this->request->get('id');
|
|
|
|
|
|
|
|
|
- $fieldToProtection = ['firstname', 'lastname', 'display_name', 'company', 'title', 'country', 'state', 'city', 'street', 'post_code' ];
|
|
|
+ $fieldToProtection = ['firstname', 'lastname', 'display_name', 'company', 'title', 'department', 'profession'];
|
|
|
|
|
|
foreach ($this->formData as $field => &$value)
|
|
|
{
|
|
|
@@ -162,36 +158,18 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
$productManager = new ProductManager();
|
|
|
$productManager->loadByHostingId($hid);
|
|
|
|
|
|
- /**
|
|
|
- *
|
|
|
- * get soap create domain service
|
|
|
- */
|
|
|
- $service =(new KerioManager())
|
|
|
- ->getApiByHosting($hid)
|
|
|
- ->soap
|
|
|
- ->service()
|
|
|
- ->updateAccount($productManager->get('cos_name'));
|
|
|
- /**
|
|
|
- *
|
|
|
- * set product manager & form data to service
|
|
|
- */
|
|
|
- $service
|
|
|
- ->setProductManager($productManager)
|
|
|
- ->setFormData($this->formData);
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * run service
|
|
|
- */
|
|
|
- $result = $service->run();
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $this->formData,
|
|
|
+ 'Debug Error',
|
|
|
+ $productManager
|
|
|
+ );
|
|
|
|
|
|
- /**
|
|
|
- * return success or error response
|
|
|
- */
|
|
|
- if(!$result)
|
|
|
+/* if(!$result)
|
|
|
{
|
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate($service->getError())->setStatusError();
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate('emailAccountHasBeenUpdated')->setStatusSuccess();
|
|
|
}
|