diff --git a/core/modules/content_moderation/src/Form/EntityModerationForm.php b/core/modules/content_moderation/src/Form/EntityModerationForm.php index ea2fedd010..66d7b11a2d 100644 --- a/core/modules/content_moderation/src/Form/EntityModerationForm.php +++ b/core/modules/content_moderation/src/Form/EntityModerationForm.php @@ -88,7 +88,7 @@ public function buildForm(array $form, FormStateInterface $form_state, ContentEn if ($current_state) { $form['current'] = [ '#type' => 'item', - '#title' => $this->t('Status'), + '#title' => $this->t('Moderation state'), '#markup' => $workflow->getState($current_state)->label(), ]; } @@ -98,7 +98,7 @@ public function buildForm(array $form, FormStateInterface $form_state, ContentEn $form['new_state'] = [ '#type' => 'select', - '#title' => $this->t('Moderate'), + '#title' => $this->t('Change to'), '#options' => $target_states, ]; 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 ebe3717901..68ae2adddf 100644 --- a/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php +++ b/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php @@ -173,7 +173,8 @@ public static function validateElement(array $element, FormStateInterface $form_ * {@inheritdoc} */ public static function isApplicable(FieldDefinitionInterface $field_definition) { - return $field_definition->getClass() === ModerationStateFieldItemList::class; + return is_subclass_of($field_definition->getClass(), ModerationStateFieldItemList::class) + || $field_definition->getClass() == ModerationStateFieldItemList::class; } } diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php index 78e4aa54da..582651230f 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -173,7 +173,7 @@ public function testNonBundleModerationForm() { // status, because the forward revision is in "Draft". $this->drupalGet('entity_test_mulrevpub/manage/1/latest'); $this->assertResponse(200); - $this->assertText('Status', 'Form text found on the latest-version page.'); + $this->assertText('Moderation state', 'Form text found on the latest-version page.'); $this->assertText('Draft', 'Correct status found on the latest-version page.'); // Submit the moderation form to change status to published.