From ac5ccef90a8cfa64784d6a99afca620b1c97bb0b Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Fri, 6 Jan 2017 13:14:42 +0000
Subject: [PATCH] Issue #2818267 by vanessakovalsky, timmillwood,
 shashikant_chauhan, Sam152: Remove delete link from Manage moderation
 settings page

---
 .../src/Form/BundleModerationConfigurationForm.php  | 13 +++++++++++++
 .../src/Tests/ModerationStateNodeTypeTest.php       |  1 +
 2 files changed, 14 insertions(+)

diff --git a/core/modules/content_moderation/src/Form/BundleModerationConfigurationForm.php b/core/modules/content_moderation/src/Form/BundleModerationConfigurationForm.php
index 10b3d6aecfcc..917ec5dedac2 100644
--- a/core/modules/content_moderation/src/Form/BundleModerationConfigurationForm.php
+++ b/core/modules/content_moderation/src/Form/BundleModerationConfigurationForm.php
@@ -139,4 +139,17 @@ public function save(array $form, FormStateInterface $form_state) {
     }
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function actions(array $form, FormStateInterface $form_state) {
+    $actions['submit'] = [
+      '#type' => 'submit',
+      '#value' => $this->t('Save'),
+      '#submit' => ['::submitForm', '::save'],
+    ];
+
+    return $actions;
+  }
+
 }
diff --git a/core/modules/content_moderation/src/Tests/ModerationStateNodeTypeTest.php b/core/modules/content_moderation/src/Tests/ModerationStateNodeTypeTest.php
index 39e1a2c3f03b..099b4dc61f9e 100644
--- a/core/modules/content_moderation/src/Tests/ModerationStateNodeTypeTest.php
+++ b/core/modules/content_moderation/src/Tests/ModerationStateNodeTypeTest.php
@@ -50,6 +50,7 @@ public function testEnablingOnExistingContent() {
     $this->assertLinkByHref('admin/structure/types/manage/not_moderated/moderation');
     $this->drupalGet('admin/structure/types/manage/not_moderated/moderation');
     $this->assertOptionSelected('edit-workflow', '');
+    $this->assertNoLink('Delete');
     $edit['workflow'] = 'editorial';
     $this->drupalPostForm(NULL, $edit, t('Save'));
 
-- 
GitLab