Skip to content
Snippets Groups Projects
Commit 4cbe7484 authored by Jeroen Tubex's avatar Jeroen Tubex Committed by Eirik Morland
Browse files

Issue #3133925 by JeroenT, eiriksm: Auto-select extractor if there is only one available

parent 8037cf43
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,7 @@ function linkchecker_form_field_config_form_alter(&$form, FormStateInterface $fo ...@@ -105,7 +105,7 @@ function linkchecker_form_field_config_form_alter(&$form, FormStateInterface $fo
'#description' => t('Defines which extractor plugin to use'), '#description' => t('Defines which extractor plugin to use'),
'#empty_value' => '', '#empty_value' => '',
'#options' => $options, '#options' => $options,
'#default_value' => $fieldConfig->getThirdPartySetting('linkchecker', 'extractor', '_none'), '#default_value' => $fieldConfig->getThirdPartySetting('linkchecker', 'extractor', count($options) === 1 ? key($options) : '_none'),
'#states' => [ '#states' => [
'required' => [ 'required' => [
':input[name="third_party_settings[linkchecker][scan]"]' => [ ':input[name="third_party_settings[linkchecker][scan]"]' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment