Browse Source

Apply suggestions from code review

Co-authored-by: Adam <adam-vessey@users.noreply.github.com>
pull/3/head
Nigel Banks 3 years ago committed by GitHub
parent
commit
389a8c9b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dgi_fixity.module

3
dgi_fixity.module

@ -243,7 +243,6 @@ function dgi_fixity_help($route_name, RouteMatchInterface $route_match) {
function dgi_fixity_field_widget_third_party_settings_form(WidgetInterface $plugin, FieldDefinitionInterface $field_definition, $form_mode, $form, FormStateInterface $form_state) {
$element = [];
if ($plugin instanceof FileWidget) {
$field_name = $field_definition->getName();
$element['validate'] = [
'#type' => 'checkbox',
'#title' => \t('Show Validate Upload Elements'),
@ -257,7 +256,7 @@ function dgi_fixity_field_widget_third_party_settings_form(WidgetInterface $plug
'#default_value' => $plugin->getThirdPartySetting('dgi_fixity', 'validate_require', FALSE),
'#states' => [
'visible' => [
":input[name=\"fields[${field_name}][settings_edit_form][third_party_settings][dgi_fixity][validate]\"]" => ['checked' => TRUE],
":input[name=\"fields[{$field_definition->getName()}][settings_edit_form][third_party_settings][dgi_fixity][validate]\"]" => ['checked' => TRUE],
],
],
];

Loading…
Cancel
Save