andre 2 лет назад
Родитель
Сommit
dd51ebeade

+ 4 - 4
app/UI/Client/EmailAccount/Providers/EditAccountDataProvider.php

@@ -120,12 +120,12 @@ class EditAccountDataProvider extends BaseDataProvider
         $this->data['lastname']     = $address['contacts'][0]['surName'];
         $this->data['display_name'] = $address['contacts'][0]['commonName'];
         $this->data['status']       = $account['isEnabled'];
-        $this->data['company']      = $address['contacts'][0]['companyName'];
         $this->data['title']        = $address['contacts'][0]['titleBefore'];
+        $this->data['profession']   = $address['contacts'][0]['profession'];
         $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'];
+        $this->data['office']       = $address['contacts'][0]['postalAddressWork']['extendedAddress'];
         $lang = di('lang');
         $this->availableValues['status'] = [
             Kerio::ACC_STATUS_ACTIVE        => $lang->absoluteT('kerio','account','status','active'),
@@ -145,7 +145,7 @@ class EditAccountDataProvider extends BaseDataProvider
         $hid = $this->request->get('id');
 
 
-        $fieldToProtection = ['firstname', 'lastname', 'display_name', 'company', 'title', 'department', 'profession'];
+        $fieldToProtection = ['firstname', 'lastname', 'display_name', 'office', 'title', 'department', 'profession'];
 
         foreach ($this->formData as $field => &$value)
         {
@@ -161,7 +161,7 @@ class EditAccountDataProvider extends BaseDataProvider
         $fields['firstName'] = $this->formData['firstname'];
         $fields['surName'] = $this->formData['lastname'];
         $fields['commonName'] = $this->formData['display_name'];
-        $fields['companyName'] = $this->formData['company'];
+        $fields['postalAddressWork']['extendedAddress'] = $this->formData['office'];
         $fields['titleBefore'] = $this->formData['title'];
         $fields['phoneNumberWorkVoice'] = $this->formData['work_phone'];
         $fields['phoneNumberMobile'] = $this->formData['mobile_phone'];

+ 3 - 3
app/UI/Client/EmailAccount/Sections/EditAdditionalSection.php

@@ -24,11 +24,11 @@ class EditAdditionalSection extends FreeFieldsSection
 
     public function initContent()
     {
-        $this->generateDoubleSection([new Text('company'), new Text('title')]);
+        $this->generateDoubleSection([new Text('title'), new Text('profession')]);
 
-        $this->generateDoubleSection([new Text('work_phone'), new Text('mobile_phone')]);
+        $this->generateDoubleSection([new Text('department'), new Text('office')]);
 
-        $this->generateDoubleSection([new Text('department'), new Text('profession')]);
+        $this->generateDoubleSection([new Text('work_phone'), new Text('mobile_phone')]);
 
     }