From 1125fa788fa3906ea2dceb9ee99870bad27a1026 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Tue, 23 Apr 2013 12:05:36 -0700 Subject: [PATCH] Issue #1976032 by Bojhan: Fixed Consolidate messages about unsaved changes. --- core/misc/tabledrag.js | 2 +- core/modules/block/block.js | 5 ----- .../views/lib/Drupal/views/Tests/UI/CachedDataUITest.php | 2 +- .../views_ui/lib/Drupal/views_ui/ViewEditFormController.php | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js index 8b3021ad6324..a803f66cfd18 100644 --- a/core/misc/tabledrag.js +++ b/core/misc/tabledrag.js @@ -1244,7 +1244,7 @@ $.extend(Drupal.theme, { return '<div class="indentation"> </div>'; }, tableDragChangedWarning: function () { - return '<div class="tabledrag-changed-warning messages warning" role="alert">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('Changes made in this table will not be saved until the form is submitted.') + '</div>'; + return '<div class="tabledrag-changed-warning messages warning" role="alert">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('You have unsaved changes.') + '</div>'; } }); diff --git a/core/modules/block/block.js b/core/modules/block/block.js index 3084fb3dd067..7025ce172f4b 100644 --- a/core/modules/block/block.js +++ b/core/modules/block/block.js @@ -63,11 +63,6 @@ Drupal.behaviors.blockDrag = { checkEmptyRegions(table, this); }; - // A custom message for the blocks page specifically. - Drupal.theme.tableDragChangedWarning = function () { - return '<div class="messages warning">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('The changes to these blocks will not be saved until the <em>Save blocks</em> button is clicked.') + '</div>'; - }; - // Add a handler so when a row is dropped, update fields dropped into new regions. tableDrag.onDrop = function () { var dragObject = this; 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 438111becf02..449f0feb4e4f 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.', 'The view has been changed.'); + $this->assertText('You have unsaved changes.'); $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 ade339a685e5..5a0780e48c0d 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 @@ -99,7 +99,7 @@ public function form(array $form, array &$form_state, EntityInterface $view) { $form['changed'] = array( '#type' => 'container', '#attributes' => array('class' => array('view-changed', 'messages', 'warning')), - '#children' => t('All changes are stored temporarily. Click "Save" to make your changes permanent. Click "Cancel" to discard your changes.'), + '#children' => t('You have unsaved changes.'), '#weight' => -10, ); if (empty($view->changed)) { -- GitLab