From: Volker E Date: Thu, 19 Sep 2019 20:36:48 +0000 (-0700) Subject: Messages collected above the form are meant to live as boxed messages X-Git-Tag: 1.34.0-rc.0~128^2 X-Git-Url: http://git.cyclocoop.org/wiki/%22%20.%20generer_url_action%28?a=commitdiff_plain;h=441e12f2d9c8a51935ae735ed51c48ed4e80bcc0;p=lhc%2Fweb%2Fwiklou.git Messages collected above the form are meant to live as boxed messages Also removing HTMLForm/VForm `.error` and `.warning` classes from 'forms.less'. Bug: T233362 Change-Id: I4f8d8f228ab07253a7df24470791c26e39bc311a --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 04be6c4e60..58c16021fc 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1329,7 +1329,7 @@ class HTMLForm extends ContextSource { } return $elementstr - ? Html::rawElement( 'div', [ 'class' => $elementsType ], $elementstr ) + ? Html::rawElement( 'div', [ 'class' => $elementsType . 'box' ], $elementstr ) : ''; } diff --git a/resources/src/mediawiki.ui/components/forms.less b/resources/src/mediawiki.ui/components/forms.less index 01318c936d..1d364ce04e 100644 --- a/resources/src/mediawiki.ui/components/forms.less +++ b/resources/src/mediawiki.ui/components/forms.less @@ -84,13 +84,11 @@ // // Markup: //
- //
An error occurred
+ //
+ //
  • An error occurred. There are problems with some of your input.
+ //
//
A warning to be noted
//
Action successful!
- //
A different kind of error
- //
- //
  • There are problems with some of your input.
- //
//
// //
@@ -107,8 +105,6 @@ //
// // Styleguide 5.2. - .error, - .warning, .errorbox, .warningbox, .successbox { @@ -119,27 +115,12 @@ word-wrap: break-word; } - // Colours taken from those for .errorbox in shared.css - .error { - background-color: @backgroundColorError; - color: @colorTextEmphasized; - border: 1px solid @borderColorError; - } - - // Colours taken from those for .warningbox in shared.css - .warning { - background-color: @backgroundColorWarning; - color: @colorTextEmphasized; - border: 1px solid @borderColorWarning; - } - // This specifies styling for individual field validation error messages. // Show them below the fields to prevent line break glitches, and leave // some space between the field and the error message box. .mw-ui-vform-field { - .error, - .warning { - display: block; + .errorbox, + .warningbox { margin-top: 5px; } }