Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/223831
Change subject: HTMLForm: Handle Flags in non-OOUI form buttons, too ...................................................................... HTMLForm: Handle Flags in non-OOUI form buttons, too Flags added to a button or submit field in a non-OOUI form will be handled now, too. With activated wgUseMediaWikiUIEverywhere: All flags will get the 'mw-ui-' prefix. With deactivated wgUseMediaWikiUIEverywhere: All flags will get the 'mw-htmlform-' prefix. Bug: T102838 Change-Id: I121a966fb4db6649a6e1012187148d354b5534f0 --- M includes/htmlform/HTMLButtonField.php 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/223831/1 diff --git a/includes/htmlform/HTMLButtonField.php b/includes/htmlform/HTMLButtonField.php index afd7cf6..105cc2d 100644 --- a/includes/htmlform/HTMLButtonField.php +++ b/includes/htmlform/HTMLButtonField.php @@ -21,8 +21,18 @@ } public function getInputHTML( $value ) { + $flags = ''; + $prefix = 'mw-htmlform-'; + if ( $this->mParent instanceof HTMLForm && + $this->mParent->getConfig()->get( 'UseMediaWikiUIEverywhere' ) + ) { + $prefix = 'mw-ui-'; + } + foreach ( $this->mFlags as $flag ) { + $flags .= ' ' . $prefix . $flag; + } $attr = array( - 'class' => 'mw-htmlform-submit ' . $this->mClass, + 'class' => 'mw-htmlform-submit ' . $this->mClass . $flags, 'id' => $this->mID, ) + $this->getAttributes( array( 'disabled', 'tabindex' ) ); -- To view, visit https://gerrit.wikimedia.org/r/223831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I121a966fb4db6649a6e1012187148d354b5534f0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits