diff --git a/core/modules/content_moderation/src/EntityTypeInfo.php b/core/modules/content_moderation/src/EntityTypeInfo.php index c9de414..0e00a28 100644 --- a/core/modules/content_moderation/src/EntityTypeInfo.php +++ b/core/modules/content_moderation/src/EntityTypeInfo.php @@ -351,11 +351,10 @@ public function formAlter(array &$form, FormStateInterface $form_state, $form_id $form['moderation_state']['#group'] = 'footer'; } - // Move the label of the current moderation state to the meta region, if - // available. + // Duplicate the label of the current moderation state to the meta + // region, if available. if (isset($form['meta']['published'])) { $form['meta']['published']['#markup'] = $form['moderation_state']['widget'][0]['current']['#markup']; - $form['moderation_state']['widget'][0]['current']['#access'] = FALSE; } } } diff --git a/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php b/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php index fa5a75e..36ae5f2 100644 --- a/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php +++ b/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php @@ -125,16 +125,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen $default_value = NULL; foreach ($transitions as $transition) { $transition_to_state = $transition->to(); - if ($transition_to_state->id() === $default->id() && !$entity->isNew()) { - $default_value = $transition_to_state->id(); - // Add the default transition to the top of the list. - $transition_labels = [ - $transition_to_state->id() => $this->t('Keep @state', ['@state' => $transition_to_state->label()]), - ] + $transition_labels; - } - else { - $transition_labels[$transition_to_state->id()] = $transition->label(); - } + $transition_labels[$transition_to_state->id()] = $transition_to_state->label(); } $element += [