Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
WCMS
uw_ct_profile
Commits
d861f850
Commit
d861f850
authored
Apr 07, 2021
by
Igor Biki
Browse files
Code standards.
parent
e7c97fea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
uw_ct_profile.module
uw_ct_profile.module
+2
-1
No files found.
uw_ct_profile.module
View file @
d861f850
...
...
@@ -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'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment