diff --git a/patches/d10-3.json b/patches/d10-3.json index 470124da32e26f7c78d827fe75b15bb158d2d7ab..8e4fe171b29d3148893594a4989e15ba7fd36b7b 100644 --- a/patches/d10-3.json +++ b/patches/d10-3.json @@ -252,6 +252,9 @@ "drupal/views_tree": { "#3344199 Add event just once": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3344199.diff" }, + "drupal/workflow": { + "#2948377 Do not hide widget when having only one option": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/show-widget-2948377-2.patch" + }, "drupal/wysiwyg_template": { "#3354588 Drupal 10 compatible": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3354588.diff" }, diff --git a/patches/d10.json b/patches/d10.json index 3f28e4e8f2d7bcb6040a7f2e55e63d6a9e01d082..009cc0ee92b0e2153b1be1e5b27c2cd6ce7f9173 100644 --- a/patches/d10.json +++ b/patches/d10.json @@ -247,6 +247,9 @@ "drupal/views_tree": { "#3344199 Add event just once": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3344199.diff" }, + "drupal/workflow": { + "#2948377 Do not hide widget when having only one option": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/show-widget-2948377-2.patch" + }, "drupal/wysiwyg_template": { "#3354588 Drupal 10 compatible": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3354588.diff" }, diff --git a/patches/d10/show-widget-2948377-2.patch b/patches/d10/show-widget-2948377-2.patch new file mode 100644 index 0000000000000000000000000000000000000000..9763a4b37061ccee091e57a9840295d51bc4e790 --- /dev/null +++ b/patches/d10/show-widget-2948377-2.patch @@ -0,0 +1,13 @@ +diff --git a/src/Entity/WorkflowState.php b/src/Entity/WorkflowState.php +index ab9660b..437bc48 100644 +--- a/src/Entity/WorkflowState.php ++++ b/src/Entity/WorkflowState.php +@@ -323,7 +323,7 @@ class WorkflowState extends ConfigEntityBase { + $options = $this->getOptions($entity, $field_name, $account, $force); + $count = count($options); + // The easiest case first: more then one option: always show form. +- if ($count > 1) { ++ if ($count >= 1) { + return TRUE; + } + // #2226451: Even in Creation state, we must have 2 visible states to show the widget.