45 $field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent );
46 $field->setShowEmptyLabel(
false );
50 public function getHTML( $submitResult ) {
57 'mediawiki.ui.button',
59 'mediawiki.ui.checkbox',
62 return parent::getHTML( $submitResult );
66 $attribs = parent::getFormAttributes();
67 $attribs[
'class'] = [
'mw-htmlform',
'mw-ui-vform',
'mw-ui-container' ];
79 if ( $this->mShowSubmit ) {
82 if ( isset( $this->mSubmitID ) ) {
86 if ( isset( $this->mSubmitName ) ) {
90 if ( isset( $this->mSubmitTooltip ) ) {
96 'mw-ui-button mw-ui-big mw-ui-block',
98 foreach ( $this->mSubmitFlags as $flag ) {
99 $attribs[
'class'][] =
'mw-ui-' . $flag;
105 if ( $this->mShowReset ) {
110 'value' => $this->
msg(
'htmlform-reset' )->text(),
111 'class' =>
'mw-ui-button mw-ui-big mw-ui-block',
116 if ( $this->mShowCancel ) {
121 'class' =>
'mw-ui-button mw-ui-big mw-ui-block',
124 $this->
msg(
'cancel' )->text()
128 foreach ( $this->mButtons as $button ) {
131 'name' => $button[
'name'],
132 'value' => $button[
'value']
136 if ( $button[
'attribs'] ) {
138 $attrs += $button[
'attribs'];
141 if ( isset( $button[
'id'] ) ) {
142 $attrs[
'id'] = $button[
'id'];
145 $attrs[
'class'] = isset( $attrs[
'class'] ) ? (array)$attrs[
'class'] : [];
146 $attrs[
'class'][] =
'mw-ui-button mw-ui-big mw-ui-block';
156 [
'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 element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null, $localizer=null, $user=null, $config=null, $relevantTitle=null)
Returns the attributes for the tooltip and access key.
static submitButton( $value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...