Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alloy Magnetic
Pyrite
Commits
e8a1ee33
Commit
e8a1ee33
authored
2 years ago
by
Kerri Howell
Browse files
Options
Download
Email Patches
Plain Diff
Fix checkbox error in webform settings when no fields or rules
parent
5b0471f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyrite.module
+3
-3
pyrite.module
with
3 additions
and
3 deletions
+3
-3
pyrite.module
View file @
e8a1ee33
...
...
@@ -34,14 +34,14 @@ function pyrite_webform_third_party_settings_form_alter(&$form, FormStateInterfa
'bitly'
=>
'Text: contains any bit.ly or tinyurl.com URL'
,
'cyrillic'
=>
'Text: contains Cyrillic characters'
,
],
'#default_value'
=>
$webform
->
getThirdPartySetting
(
'pyrite'
,
'rules'
)
'#default_value'
=>
$webform
->
getThirdPartySetting
(
'pyrite'
,
'rules'
)
?:
[],
];
$form
[
'third_party_settings'
][
'pyrite'
][
'name_fields'
]
=
array
(
'#type'
=>
'checkboxes'
,
'#title'
=>
t
(
'Name fields'
),
'#options'
=>
$options
,
'#default_value'
=>
$webform
->
getThirdPartySetting
(
'pyrite'
,
'name_fields'
),
'#default_value'
=>
$webform
->
getThirdPartySetting
(
'pyrite'
,
'name_fields'
)
?:
[]
,
'#description'
=>
t
(
'Select the fields that should be checked for name criteria.'
),
);
...
...
@@ -49,7 +49,7 @@ function pyrite_webform_third_party_settings_form_alter(&$form, FormStateInterfa
'#type'
=>
'checkboxes'
,
'#title'
=>
t
(
'Text fields'
),
'#options'
=>
$options
,
'#default_value'
=>
$webform
->
getThirdPartySetting
(
'pyrite'
,
'text_fields'
),
'#default_value'
=>
$webform
->
getThirdPartySetting
(
'pyrite'
,
'text_fields'
)
?:
[]
,
'#description'
=>
t
(
'Select the fields to be checked for text criteria.'
),
);
}
...
...
This diff is collapsed.
Click to expand it.
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