48 $field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent );
49 $field->setShowEmptyLabel(
false );
53 public function getHTML( $submitResult ) {
60 'mediawiki.ui.button',
62 'mediawiki.ui.checkbox',
65 return parent::getHTML( $submitResult );
69 $attribs = parent::getFormAttributes();
70 $attribs[
'class'] = [
'mw-htmlform',
'mw-ui-vform',
'mw-ui-container' ];
82 if ( $this->mShowSubmit ) {
85 if ( isset( $this->mSubmitID ) ) {
89 if ( isset( $this->mSubmitName ) ) {
93 if ( isset( $this->mSubmitTooltip ) ) {
94 $attribs += Linker::tooltipAndAccesskeyAttribs( $this->mSubmitTooltip );
99 'mw-ui-button mw-ui-big mw-ui-block',
101 foreach ( $this->mSubmitFlags as $flag ) {
102 $attribs[
'class'][] =
'mw-ui-' . $flag;
108 if ( $this->mShowReset ) {
109 $buttons .= Html::element(
113 'value' => $this->
msg(
'htmlform-reset' )->text(),
114 'class' =>
'mw-ui-button mw-ui-big mw-ui-block',
119 if ( $this->mShowCancel ) {
121 $buttons .= Html::element(
124 'class' =>
'mw-ui-button mw-ui-big mw-ui-block',
127 $this->
msg(
'cancel' )->text()
131 foreach ( $this->mButtons as $button ) {
134 'name' => $button[
'name'],
135 'value' => $button[
'value']
139 if ( $button[
'attribs'] ) {
141 $attrs += $button[
'attribs'];
144 if ( isset( $button[
'id'] ) ) {
145 $attrs[
'id'] = $button[
'id'];
148 $attrs[
'class'] = isset( $attrs[
'class'] ) ? (array)$attrs[
'class'] : [];
149 $attrs[
'class'][] =
'mw-ui-button mw-ui-big mw-ui-block';
151 $buttons .= Html::element(
'input', $attrs ) .
"\n";
158 return Html::rawElement(
'div',
159 [
'class' =>
'mw-htmlform-submit-buttons' ],
"\n$buttons" ) .
"\n";
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
static submitButton( $value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...