Commit d861f850 authored by Igor Biki's avatar Igor Biki
Browse files

Code standards.

parent e7c97fea
......@@ -19,7 +19,8 @@ function uw_ct_profile_form_node_uw_ct_profile_form_alter(&$form, FormStateInter
'wrapper' => $form['#id'],
];
// Apply readonly to fields only when link with contact field has contact entity referenced.
// Apply readonly to fields only when link with contact field has contact
// entity referenced.
if (!empty($form_state->getValue('field_uw_ct_profile_contact')[0]['target_id'])) {
foreach (_uw_ct_profile_alter_fields() as $profile_field => $contact_field) {
$form[$profile_field]['widget'][0]['value']['#attributes']['readonly'] = 'readonly';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment