Issue #1986408 by LewisNyman, oresh: Message style update.
parent
6c1c3b9b96
commit
60c3a75e8f
|
|
@ -30,7 +30,7 @@ function authorize_filetransfer_form($form, &$form_state) {
|
|||
|
||||
if (!Drupal::request()->isSecure()) {
|
||||
$form['information']['https_warning'] = array(
|
||||
'#prefix' => '<div class="messages error">',
|
||||
'#prefix' => '<div class="messages messages--error">',
|
||||
'#markup' => t('WARNING: You are not using an encrypted connection, so your password will be sent in plain text. <a href="@https-link">Learn more</a>.', array('@https-link' => 'http://drupal.org/https-information')),
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1711,7 +1711,7 @@ function theme_status_messages($variables) {
|
|||
'warning' => t('Warning message'),
|
||||
);
|
||||
foreach (drupal_get_messages($display) as $type => $messages) {
|
||||
$output .= "<div class=\"messages $type\">\n";
|
||||
$output .= "<div class=\"messages messages--$type\">\n";
|
||||
if (!empty($status_heading[$type])) {
|
||||
$output .= '<h2 class="element-invisible">' . $status_heading[$type] . "</h2>\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ $.extend(Drupal.ProgressBar.prototype, {
|
|||
* Display errors on the page.
|
||||
*/
|
||||
displayError: function (string) {
|
||||
var error = $('<div class="messages error"></div>').html(string);
|
||||
var error = $('<div class="messages messages--error"></div>').html(string);
|
||||
$(this.element).before(error).hide();
|
||||
|
||||
if (this.errorCallback) {
|
||||
|
|
|
|||
|
|
@ -1254,7 +1254,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('You have unsaved changes.') + '</div>';
|
||||
return '<div class="tabledrag-changed-warning messages messages--warning" role="alert">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('You have unsaved changes.') + '</div>';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class Block extends DisplayPluginBase {
|
|||
if (!$this->usesExposed() && parent::usesExposed()) {
|
||||
$form['exposed_form_options']['warning'] = array(
|
||||
'#weight' => -10,
|
||||
'#markup' => '<div class="messages warning">' . t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.') . '</div>',
|
||||
'#markup' => '<div class="messages messages--warning">' . t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.') . '</div>',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class FieldEditForm implements FormInterface {
|
|||
// If so, prevent changes to the field settings.
|
||||
$has_data = field_has_data($field);
|
||||
if ($has_data) {
|
||||
$form['field']['#prefix'] = '<div class="messages error">' . t('There is data for this field in the database. The field settings can no longer be changed.') . '</div>' . $form['field']['#prefix'];
|
||||
$form['field']['#prefix'] = '<div class="messages messages--error">' . t('There is data for this field in the database. The field settings can no longer be changed.') . '</div>' . $form['field']['#prefix'];
|
||||
}
|
||||
|
||||
// Build the configurable field values.
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ Drupal.file = Drupal.file || {
|
|||
'%filename': this.value.replace('C:\\fakepath\\', ''),
|
||||
'%extensions': extensionPattern.replace(/\|/g, ', ')
|
||||
});
|
||||
$(this).closest('div.form-managed-file').prepend('<div class="messages error file-upload-js-error" aria-live="polite">' + error + '</div>');
|
||||
$(this).closest('div.form-managed-file').prepend('<div class="messages messages--error file-upload-js-error" aria-live="polite">' + error + '</div>');
|
||||
this.value = '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,11 +95,21 @@ ul.menu {
|
|||
/**
|
||||
* RTL Styles for system messages.
|
||||
*/
|
||||
.messages {
|
||||
border-width: 1px 8px 1px 1px;
|
||||
background-position-x: 99%;
|
||||
padding-left: 20px;
|
||||
padding-right: 35px;
|
||||
text-align: right;
|
||||
}
|
||||
.messages--status {
|
||||
background-position: 99.3% 19px;
|
||||
border-color: #c9e1bd #77b259 #c9e1bd #c9e1bd;
|
||||
}
|
||||
.messages--warning {
|
||||
border-color: #f4daa6 #e09600 #f4daa6 #f4daa6;
|
||||
}
|
||||
.messages--error {
|
||||
border-color: #f9c9bf #e62600 #f9c9bf #f9c9bf;
|
||||
}
|
||||
|
||||
div.messages {
|
||||
background-position: 99% 8px;
|
||||
padding: 10px 50px 10px 10px;
|
||||
}
|
||||
div.messages ul {
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,62 +428,67 @@ ul.tabs {
|
|||
/**
|
||||
* Styles for system messages.
|
||||
*/
|
||||
div.messages {
|
||||
background-position: 8px 8px; /* LTR */
|
||||
background-repeat: no-repeat;
|
||||
.messages {
|
||||
background: no-repeat 10px 18px; /* LTR */
|
||||
border: 1px solid;
|
||||
margin: 6px 0;
|
||||
padding: 10px 10px 10px 50px; /* LTR */
|
||||
border-width: 1px 1px 1px 8px; /* LTR */
|
||||
border-radius: 2px;
|
||||
padding: 15px 20px 15px 35px; /* LTR */
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.messages.status {
|
||||
background-image: url(../../misc/message-24-ok.png);
|
||||
border-color: #be7;
|
||||
.messages + .messages {
|
||||
margin-top: 1.538em;
|
||||
}
|
||||
.messages.status,
|
||||
.ok {
|
||||
color: #234600;
|
||||
}
|
||||
.messages.status,
|
||||
table tr.ok {
|
||||
background-color: #f8fff0;
|
||||
}
|
||||
|
||||
.messages.warning {
|
||||
background-image: url(../../misc/message-24-warning.png);
|
||||
border-color: #ed5;
|
||||
}
|
||||
.messages.warning,
|
||||
.warning {
|
||||
color: #840;
|
||||
}
|
||||
.messages.warning,
|
||||
table tr.warning {
|
||||
background-color: #fffce5;
|
||||
}
|
||||
|
||||
.messages.error {
|
||||
background-image: url(../../misc/message-24-error.png);
|
||||
border-color: #ed541d;
|
||||
}
|
||||
.messages.error,
|
||||
.error {
|
||||
color: #8c2e0b;
|
||||
}
|
||||
.messages.error,
|
||||
table tr.error {
|
||||
background-color: #fef5f1;
|
||||
}
|
||||
.messages.error p.error {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div.messages ul {
|
||||
margin: 0 0 0 1em; /* LTR */
|
||||
.messages ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
div.messages ul li {
|
||||
list-style-image: none;
|
||||
.messages li + li {
|
||||
margin-top: .769em;
|
||||
}
|
||||
|
||||
/* @TODO Separate tables and messages styling */
|
||||
.messages--status {
|
||||
border-color: #c9e1bd #c9e1bd #c9e1bd #77b259; /* LTR */
|
||||
background-image: url(../../misc/message-16-ok.png);
|
||||
background-position: 12px 19px; /* LTR */
|
||||
}
|
||||
.messages--status,
|
||||
.ok {
|
||||
color: #325e1c;
|
||||
}
|
||||
.messages--status,
|
||||
table tr.ok {
|
||||
background-color: #f3faef;
|
||||
}
|
||||
|
||||
.messages--warning {
|
||||
background-image: url(../../misc/message-16-warning.png);
|
||||
border-color: #f4daa6 #f4daa6 #f4daa6 #e09600; /* LTR */
|
||||
}
|
||||
.messages--warning,
|
||||
.warning {
|
||||
color: #734c00;
|
||||
}
|
||||
.messages--warning,
|
||||
table tr.warning {
|
||||
background-color: #fdf8ed;
|
||||
}
|
||||
|
||||
.messages--error {
|
||||
background-image: url(../../misc/message-16-error.png);
|
||||
border-color: #f9c9bf #f9c9bf #f9c9bf #e62600; /* LTR */
|
||||
}
|
||||
.messages--error,
|
||||
.error {
|
||||
color: #a51b00;
|
||||
}
|
||||
.messages--error,
|
||||
table tr.error {
|
||||
background-color: #fcf4f2;
|
||||
}
|
||||
.messages--error p.error {
|
||||
color: #a51b00;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ class Sql extends QueryPluginBase {
|
|||
'#description' => t('Disabling SQL rewriting will disable node_access checks as well as other modules that implement hook_query_alter().'),
|
||||
'#type' => 'checkbox',
|
||||
'#default_value' => !empty($this->options['disable_sql_rewrite']),
|
||||
'#suffix' => '<div class="messages warning sql-rewrite-warning js-hide">' . t('WARNING: Disabling SQL rewriting means that node access security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Use this option only if you understand and accept this security risk.') . '</div>',
|
||||
'#suffix' => '<div class="messages messages--warning sql-rewrite-warning js-hide">' . t('WARNING: Disabling SQL rewriting means that node access security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Use this option only if you understand and accept this security risk.') . '</div>',
|
||||
);
|
||||
$form['distinct'] = array(
|
||||
'#type' => 'checkbox',
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class Table extends StylePluginBase {
|
|||
$handlers = $this->displayHandler->getHandlers('field');
|
||||
if (empty($handlers)) {
|
||||
$form['error_markup'] = array(
|
||||
'#markup' => '<div class="error messages">' . t('You need at least one field before you can configure your table settings') . '</div>',
|
||||
'#markup' => '<div class="messages messages--error">' . t('You need at least one field before you can configure your table settings') . '</div>',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class ViewEditFormController extends ViewFormControllerBase {
|
|||
if ($view->isLocked()) {
|
||||
$form['locked'] = array(
|
||||
'#type' => 'container',
|
||||
'#attributes' => array('class' => array('view-locked', 'messages', 'warning')),
|
||||
'#attributes' => array('class' => array('view-locked', 'messages', 'messages--warning')),
|
||||
'#children' => t('This view is being edited by user !user, and is therefore locked from editing by others. This lock is !age old. Click here to <a href="!break">break this lock</a>.', array('!user' => theme('username', array('account' => user_load($view->lock->owner))), '!age' => format_interval(REQUEST_TIME - $view->lock->updated), '!break' => url('admin/structure/views/view/' . $view->id() . '/break-lock'))),
|
||||
'#weight' => -10,
|
||||
);
|
||||
|
|
@ -84,7 +84,7 @@ class ViewEditFormController extends ViewFormControllerBase {
|
|||
else {
|
||||
$form['changed'] = array(
|
||||
'#type' => 'container',
|
||||
'#attributes' => array('class' => array('view-changed', 'messages', 'warning')),
|
||||
'#attributes' => array('class' => array('view-changed', 'messages', 'messages--warning')),
|
||||
'#children' => t('You have unsaved changes.'),
|
||||
'#weight' => -10,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ function update_script_selection_form($form, &$form_state) {
|
|||
'#type' => 'item',
|
||||
'#title' => $module . ' module',
|
||||
'#markup' => $update['warning'],
|
||||
'#prefix' => '<div class="messages warning">',
|
||||
'#prefix' => '<div class="messages messages--warning">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
$incompatible_updates_exist = TRUE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue