X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLFormField.php;h=8604ba2098da405a005f7532e0ca3d8cee4179ba;hb=e3f6c10d87732c0c8a9bbd7bb57b6c964b92e29a;hp=8f42ea2c7484aef8819ed69f78c354078868d3a5;hpb=3f12ee2a5d557ded323436d10aa929e22e4840e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 8f42ea2c74..8604ba2098 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -455,10 +455,6 @@ abstract class HTMLFormField { $this->mFilterCallback = $params['filter-callback']; } - if ( isset( $params['flatlist'] ) ) { - $this->mClass .= ' mw-htmlform-flatlist'; - } - if ( isset( $params['hidelabel'] ) ) { $this->mShowEmptyLabels = false; } @@ -606,7 +602,7 @@ abstract class HTMLFormField { } $fieldType = get_class( $this ); - $helpText = $this->getHelpText(); + $help = $this->getHelpText(); $errors = $this->getErrorsRaw( $value ); foreach ( $errors as &$error ) { $error = new OOUI\HtmlSnippet( $error ); @@ -620,7 +616,7 @@ abstract class HTMLFormField { $config = [ 'classes' => [ "mw-htmlform-field-$fieldType", $this->mClass ], 'align' => $this->getLabelAlignOOUI(), - 'help' => $helpText !== null ? new OOUI\HtmlSnippet( $helpText ) : null, + 'help' => ( $help !== null && $help !== '' ) ? new OOUI\HtmlSnippet( $help ) : null, 'errors' => $errors, 'notices' => $notices, 'infusable' => $infusable,