X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fhtmlform%2FOOUIHTMLForm.php;h=9dd37b31ee4342771ad397cdb8cf2aa8fa9a3d69;hp=66503216336022e455b52dc934832ba3560c62b3;hb=4838f88d844056d475967a96d592f1271cc987bf;hpb=9e398f813a5c54695f1c3e4e75f2d8cb9f6443f6 diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index 6650321633..9dd37b31ee 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -66,7 +66,10 @@ class OOUIHTMLForm extends HTMLForm { } if ( isset( $this->mSubmitTooltip ) ) { - $attribs += Linker::tooltipAndAccesskeyAttribs( $this->mSubmitTooltip ); + $attribs += [ + 'title' => Linker::titleAttrib( $this->mSubmitTooltip ), + 'accessKey' => Linker::accesskey( $this->mSubmitTooltip ), + ]; } $attribs['classes'] = [ 'mw-htmlform-submit' ]; @@ -191,6 +194,10 @@ class OOUIHTMLForm extends HTMLForm { * @return string */ public function getErrorsOrWarnings( $elements, $elementsType ) { + if ( $elements === '' ) { + return ''; + } + if ( !in_array( $elementsType, [ 'error', 'warning' ], true ) ) { throw new DomainException( $elementsType . ' is not a valid type.' ); }