From 673c39f283eafd1e289f96971d90e26fadf917d0 Mon Sep 17 00:00:00 2001 From: Jonathan Hunt Date: Fri, 27 Sep 2024 11:38:15 +1200 Subject: [PATCH] #1053 Override condition form config to make URI optional (to prevent blocking submissions for other conditions) --- src/Plugin/Condition/ParentNodeOfNodeHasTerm.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Plugin/Condition/ParentNodeOfNodeHasTerm.php b/src/Plugin/Condition/ParentNodeOfNodeHasTerm.php index 0cff89a80..2caaa6d24 100644 --- a/src/Plugin/Condition/ParentNodeOfNodeHasTerm.php +++ b/src/Plugin/Condition/ParentNodeOfNodeHasTerm.php @@ -26,6 +26,16 @@ */ class ParentNodeOfNodeHasTerm extends NodeHasTerm { + /** + * {@inheritdoc} + */ + public function buildConfigurationForm(array $form, FormStateInterface $form_state) { + $form = parent::buildConfigurationForm($form, $form_state); + // Make term not required. + $form['term']['#required'] = FALSE; + return $form; + } + /** * {@inheritdoc} */