From ca38f739ac5df33b4f571cbae80a2e5507236566 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Fri, 11 Dec 2020 11:00:47 +0300 Subject: [PATCH] #2851 [profile-module] Error when trying to fill fields --- .../src/Profile/Profile/ProfileFormHandler.php | 16 ++++++++-------- .../Profile/Register2/Register2FormFields.php | 5 ++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/addons/default/visiosoft/profile-module/src/Profile/Profile/ProfileFormHandler.php b/addons/default/visiosoft/profile-module/src/Profile/Profile/ProfileFormHandler.php index 2a93e5a21..ed0775c78 100644 --- a/addons/default/visiosoft/profile-module/src/Profile/Profile/ProfileFormHandler.php +++ b/addons/default/visiosoft/profile-module/src/Profile/Profile/ProfileFormHandler.php @@ -17,14 +17,14 @@ class ProfileFormHandler } $parameters = [ - 'gsm_phone' => $builder->getPostValue('gsm_phone'), - 'office_phone' => $builder->getPostValue('office_phone'), - 'land_phone' => $builder->getPostValue('land_phone'), - 'identification_number' => $builder->getPostValue('identification_number'), - 'birthday' => $builder->getPostValue('birthday'), - 'register_type' => $builder->getPostValue('register_type'), - 'facebook_address' => $builder->getPostValue('facebook_address'), - 'google_address' => $builder->getPostValue('google_address'), + 'gsm_phone' => $builder->getPostValue('gsm_phone') ?: null, + 'office_phone' => $builder->getPostValue('office_phone') ?: null, + 'land_phone' => $builder->getPostValue('land_phone') ?: null, + 'identification_number' => $builder->getPostValue('identification_number') ?: null, + 'birthday' => $builder->getPostValue('birthday') ?: null, + 'register_type' => $builder->getPostValue('register_type') ?: null, + 'facebook_address' => $builder->getPostValue('facebook_address') ?: null, + 'google_address' => $builder->getPostValue('google_address') ?: null, ]; if (setting_value('visiosoft.module.profile::show_education_profession')) { diff --git a/addons/default/visiosoft/profile-module/src/Profile/Register2/Register2FormFields.php b/addons/default/visiosoft/profile-module/src/Profile/Register2/Register2FormFields.php index 9f9722603..ba35ec24c 100644 --- a/addons/default/visiosoft/profile-module/src/Profile/Register2/Register2FormFields.php +++ b/addons/default/visiosoft/profile-module/src/Profile/Register2/Register2FormFields.php @@ -70,7 +70,10 @@ class Register2FormFields "register_type" => [ "type" => "anomaly.field_type.select", "config" => [ - "options" => ['personal' => 'visiosoft.module.profile::field.personal.name', 'corporate' => 'visiosoft.module.profile::field.corporate.name'], + "options" => [ + 1 => 'visiosoft.module.profile::field.personal.name', + 2 => 'visiosoft.module.profile::field.corporate.name' + ], "mode" => "radio", ], ],