From f1fd07084ac647f36104ad4c6a1ee8928075c24d Mon Sep 17 00:00:00 2001
From: Dries <dries@buytaert.net>
Date: Sat, 9 Mar 2013 16:46:10 -0500
Subject: [PATCH] Issue #1923512 by damiankloip: Remove view edit message to
 discard a view.

---
 .../views/lib/Drupal/views/Tests/UI/CachedDataUITest.php | 2 +-
 .../lib/Drupal/views_ui/ViewEditFormController.php       | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/CachedDataUITest.php b/core/modules/views/lib/Drupal/views/Tests/UI/CachedDataUITest.php
index cd08f42f20c9..438111becf02 100644
--- a/core/modules/views/lib/Drupal/views/Tests/UI/CachedDataUITest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/UI/CachedDataUITest.php
@@ -41,7 +41,7 @@ public function testCacheData() {
     $this->drupalGet('admin/structure/views/view/test_view/edit');
     // Make sure we have 'changes' to the view.
     $this->drupalPost('admin/structure/views/nojs/display/test_view/default/title', array(), t('Apply'));
-    $this->assertText('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard your changes.', 'The view has been changed.');
+    $this->assertText('All changes are stored temporarily.', 'The view has been changed.');
 
     $view_cache = $temp_store->get('test_view');
     // The view should be enabled.
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
index 3ce86e8b67b9..4b1df77e3c33 100644
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
@@ -96,17 +96,10 @@ public function form(array $form, array &$form_state, EntityInterface $view) {
       );
     }
     else {
-      if (isset($view->vid) && $view->vid == 'new') {
-        $message = t('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard the view.');
-      }
-      else {
-        $message = t('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard your changes.');
-      }
-
       $form['changed'] = array(
         '#type' => 'container',
         '#attributes' => array('class' => array('view-changed', 'messages', 'warning')),
-        '#children' => $message,
+        '#children' => t('All changes are stored temporarily. Click "Save" to make your changes permanent. Click "Cancel" to discard your changes.'),
         '#weight' => -10,
       );
       if (empty($view->changed)) {
-- 
GitLab