Commit 1125fa78 authored by webchick's avatar webchick

Issue #1976032 by Bojhan: Fixed Consolidate messages about unsaved changes.

parent f5a1c488
......@@ -1244,7 +1244,7 @@ $.extend(Drupal.theme, {
return '<div class="indentation">&nbsp;</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>';
}
});
......
......@@ -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;
......
......@@ -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.
......
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment