mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-23 14:46:44 +00:00
Refactor logic for component rendering
Result is exactly same, but mediawiki ui markup is centralized to a single function. Bug: T353371 Change-Id: If021e39beb48246985edf40dc94e2442e9fc49ee
This commit is contained in:
parent
e05fa7c695
commit
3bf7584c51
|
@ -209,7 +209,7 @@ class InputBox {
|
|||
|
||||
$htmlOut .= $this->buildTextBox( [
|
||||
// enable SearchSuggest with mw-searchInput class
|
||||
'class' => $this->getLinebreakClasses() . 'mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline',
|
||||
'class' => $this->getLinebreakClasses() . 'mw-searchInput searchboxInput',
|
||||
'name' => 'search',
|
||||
'type' => $this->mHidden ? 'hidden' : 'text',
|
||||
'value' => $this->mDefaultText,
|
||||
|
@ -291,18 +291,9 @@ class InputBox {
|
|||
);
|
||||
} else {
|
||||
// Checkbox
|
||||
$htmlOut .= ' <div class="mw-inputbox-element mw-ui-checkbox">';
|
||||
$htmlOut .= Xml::element( 'input',
|
||||
[
|
||||
'type' => 'checkbox',
|
||||
'name' => 'ns' . $i,
|
||||
'value' => 1,
|
||||
'id' => 'mw-inputbox-ns' . $i . $idRandStr
|
||||
] + $checked
|
||||
$htmlOut .= $this->buildCheckboxInput(
|
||||
'ns' . $i, 'mw-inputbox-ns' . $i . $idRandStr, "1", $checked
|
||||
);
|
||||
// Label
|
||||
$htmlOut .= Xml::label( $name, 'mw-inputbox-ns' . $i . $idRandStr );
|
||||
$htmlOut .= '</div> ';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,11 +301,10 @@ class InputBox {
|
|||
$htmlOut .= $this->mBR;
|
||||
} elseif ( $type === 'search' ) {
|
||||
// Go button
|
||||
$htmlOut .= Xml::element( 'input',
|
||||
$htmlOut .= $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'name' => 'go',
|
||||
'class' => 'mw-ui-button',
|
||||
'value' => $this->mButtonLabel
|
||||
]
|
||||
);
|
||||
|
@ -322,11 +312,10 @@ class InputBox {
|
|||
}
|
||||
|
||||
// Search button
|
||||
$htmlOut .= Xml::element( 'input',
|
||||
$htmlOut .= $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'name' => 'fulltext',
|
||||
'class' => 'mw-ui-button',
|
||||
'value' => $this->mSearchButtonLabel
|
||||
]
|
||||
);
|
||||
|
@ -388,29 +377,27 @@ class InputBox {
|
|||
'type' => $this->mHidden ? 'hidden' : 'text',
|
||||
'name' => 'search',
|
||||
// enable SearchSuggest with mw-searchInput class
|
||||
'class' => 'mw-searchInput mw-ui-input mw-ui-input-inline',
|
||||
'class' => 'mw-searchInput',
|
||||
'size' => $this->mWidth,
|
||||
'id' => 'bodySearchInput' . $id,
|
||||
'dir' => $this->mDir,
|
||||
'placeholder' => $this->mPlaceholderText
|
||||
] );
|
||||
|
||||
$htmlOut .= "\u{00A0}" . Xml::element( 'input',
|
||||
$htmlOut .= "\u{00A0}" . $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'name' => 'go',
|
||||
'value' => $this->mButtonLabel,
|
||||
'class' => 'mw-ui-button',
|
||||
]
|
||||
);
|
||||
|
||||
// Better testing needed here!
|
||||
if ( $this->mFullTextButton !== '' ) {
|
||||
$htmlOut .= Xml::element( 'input',
|
||||
$htmlOut .= $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'name' => 'fulltext',
|
||||
'class' => 'mw-ui-button',
|
||||
'value' => $this->mSearchButtonLabel
|
||||
]
|
||||
);
|
||||
|
@ -491,7 +478,7 @@ class InputBox {
|
|||
'type' => $this->mHidden ? 'hidden' : 'text',
|
||||
'name' => 'title',
|
||||
'class' => $this->getLinebreakClasses() .
|
||||
'mw-ui-input mw-ui-input-inline mw-inputbox-createbox',
|
||||
'mw-inputbox-createbox',
|
||||
'value' => $this->mDefaultText,
|
||||
'placeholder' => $this->mPlaceholderText,
|
||||
// For visible input fields, use required so that the form will not
|
||||
|
@ -502,13 +489,13 @@ class InputBox {
|
|||
] );
|
||||
|
||||
$htmlOut .= $this->mBR;
|
||||
$htmlOut .= Xml::openElement( 'input',
|
||||
$htmlOut .= $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'name' => 'create',
|
||||
'class' => 'mw-ui-button mw-ui-progressive',
|
||||
'value' => $this->mButtonLabel
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
$htmlOut .= Xml::closeElement( 'form' );
|
||||
$htmlOut .= Xml::closeElement( 'div' );
|
||||
|
@ -550,7 +537,7 @@ class InputBox {
|
|||
$htmlOut .= $this->buildTextBox( [
|
||||
'type' => $this->mHidden ? 'hidden' : 'text',
|
||||
'name' => 'wpNewTitle',
|
||||
'class' => $this->getLinebreakClasses() . 'mw-moveboxInput mw-ui-input mw-ui-input-inline',
|
||||
'class' => $this->getLinebreakClasses() . 'mw-moveboxInput',
|
||||
'value' => $this->mDefaultText,
|
||||
'placeholder' => $this->mPlaceholderText,
|
||||
'size' => $this->mWidth,
|
||||
|
@ -558,12 +545,12 @@ class InputBox {
|
|||
] );
|
||||
|
||||
$htmlOut .= $this->mBR;
|
||||
$htmlOut .= Xml::openElement( 'input',
|
||||
$htmlOut .= $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'mw-ui-button mw-ui-progressive',
|
||||
'value' => $this->mButtonLabel
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
$htmlOut .= Xml::closeElement( 'form' );
|
||||
$htmlOut .= Xml::closeElement( 'div' );
|
||||
|
@ -614,7 +601,7 @@ class InputBox {
|
|||
$htmlOut .= $this->buildTextBox( [
|
||||
'type' => $this->mHidden ? 'hidden' : 'text',
|
||||
'name' => 'preloadtitle',
|
||||
'class' => $this->getLinebreakClasses() . 'commentboxInput mw-ui-input mw-ui-input-inline',
|
||||
'class' => $this->getLinebreakClasses() . 'commentboxInput',
|
||||
'value' => $this->mDefaultText,
|
||||
'placeholder' => $this->mPlaceholderText,
|
||||
'size' => $this->mWidth,
|
||||
|
@ -627,13 +614,13 @@ class InputBox {
|
|||
}
|
||||
$htmlOut .= Html::hidden( 'title', $this->mPage );
|
||||
$htmlOut .= $this->mBR;
|
||||
$htmlOut .= Xml::openElement( 'input',
|
||||
$htmlOut .= $this->buildSubmitInput(
|
||||
[
|
||||
'type' => 'submit',
|
||||
'name' => 'create',
|
||||
'class' => 'mw-ui-button mw-ui-progressive',
|
||||
'value' => $this->mButtonLabel
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
$htmlOut .= Xml::closeElement( 'form' );
|
||||
$htmlOut .= Xml::closeElement( 'div' );
|
||||
|
@ -756,7 +743,8 @@ REGEX;
|
|||
}
|
||||
|
||||
/**
|
||||
* Factory method to help build the textbox widget
|
||||
* Factory method to help build the textbox widget.
|
||||
*
|
||||
* @param array $defaultAttr
|
||||
* @return string
|
||||
*/
|
||||
|
@ -765,7 +753,52 @@ REGEX;
|
|||
$defaultAttr[ 'aria-label' ] = $this->mTextBoxAriaLabel;
|
||||
}
|
||||
|
||||
return Html::openElement( 'input', $defaultAttr );
|
||||
$class = $defaultAttr[ 'class' ] ?? '';
|
||||
$class .= ' mw-ui-input mw-ui-input-inline';
|
||||
$defaultAttr[ 'class' ] = $class;
|
||||
return Html::element( 'input', $defaultAttr );
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to help build checkbox input.
|
||||
*
|
||||
* @param string $name name of input
|
||||
* @param string $id id of input
|
||||
* @param string $value value of input
|
||||
* @param array $defaultAttr (optional)
|
||||
* @return string
|
||||
*/
|
||||
private function buildCheckboxInput( $name, $id, $value, $defaultAttr = [] ) {
|
||||
$htmlOut = ' <div class="mw-inputbox-element mw-ui-checkbox">';
|
||||
$htmlOut .= Xml::element( 'input',
|
||||
[
|
||||
'type' => 'checkbox',
|
||||
'name' => $name,
|
||||
'value' => $value,
|
||||
'id' => $id,
|
||||
] + $defaultAttr
|
||||
);
|
||||
// Label
|
||||
$htmlOut .= Xml::label( $name, $id );
|
||||
$htmlOut .= '</div> ';
|
||||
return $htmlOut;
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to help build submit button.
|
||||
*
|
||||
* @param array $defaultAttr
|
||||
* @param bool $isProgressive (optional)
|
||||
* @return string
|
||||
*/
|
||||
private function buildSubmitInput( $defaultAttr, $isProgressive = false ) {
|
||||
$defaultAttr[ 'class' ] ??= '';
|
||||
$defaultAttr[ 'class' ] .= ' mw-ui-button';
|
||||
if ( $isProgressive ) {
|
||||
$defaultAttr[ 'class' ] .= ' mw-ui-progressive';
|
||||
}
|
||||
$defaultAttr[ 'class' ] = trim( $defaultAttr[ 'class' ] );
|
||||
return Xml::element( 'input', $defaultAttr );
|
||||
}
|
||||
|
||||
private function bgColorStyle() {
|
||||
|
|
|
@ -11,7 +11,7 @@ InputBox type=search
|
|||
type=search
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="go" class="mw-ui-button" value="Try exact match" /> <input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="go" value="Try exact match" class="mw-ui-button" /> <input type="submit" name="fulltext" value="Search full text" class="mw-ui-button" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -21,7 +21,7 @@ InputBox type=create
|
|||
type=create
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -32,7 +32,7 @@ type=create
|
|||
minor=1
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="1" name="minor" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="1" name="minor" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -43,7 +43,7 @@ type=create
|
|||
minor=0
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="0" name="minor" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="0" name="minor" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -55,7 +55,7 @@ preloadparams[]=param1
|
|||
preloadparams[]=param2
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="param1" name="preloadparams[]" /><input type="hidden" value="param2" name="preloadparams[]" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="param1" name="preloadparams[]" /><input type="hidden" value="param2" name="preloadparams[]" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -67,7 +67,7 @@ preloadparams[]=
|
|||
preloadparams[]=
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="preloadparams[]" /><input type="hidden" name="preloadparams[]" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="preloadparams[]" /><input type="hidden" name="preloadparams[]" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -78,7 +78,7 @@ type=create
|
|||
editintro=MediaWiki:Test
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="MediaWiki:Test" name="editintro" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="MediaWiki:Test" name="editintro" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -89,7 +89,7 @@ type=create
|
|||
editintro=
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="editintro" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="editintro" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -100,7 +100,7 @@ type=create
|
|||
summary=Summary test
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="Summary test" name="summary" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="Summary test" name="summary" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -111,7 +111,7 @@ type=create
|
|||
summary=
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="summary" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="summary" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -122,7 +122,7 @@ type=create
|
|||
nosummary=true
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="true" name="nosummary" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="true" name="nosummary" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -133,7 +133,7 @@ type=create
|
|||
nosummary=
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="nosummary" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="nosummary" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -144,7 +144,7 @@ type=create
|
|||
prefix=Test/
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="Test/" name="prefix" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="Test/" name="prefix" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -155,7 +155,7 @@ type=create
|
|||
prefix=
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -166,7 +166,7 @@ type=create
|
|||
preload=test
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="test" name="preload" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="test" name="preload" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -177,7 +177,7 @@ type=create
|
|||
preload=
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="preload" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Create page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="preload" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Create page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -187,7 +187,7 @@ InputBox type=comment
|
|||
type=comment
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="new" name="section" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="New section" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="new" name="section" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" placeholder="" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="New section" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -197,7 +197,7 @@ InputBox type=commenttitle
|
|||
type=commenttitle
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="commentbox" class="commentbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="preloadtitle" class="mw-inputbox-input commentboxInput mw-ui-input mw-ui-input-inline" placeholder="" size="50" dir="ltr" /><input type="hidden" value="new" name="section" /><input type="hidden" name="title" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="New section" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="commentbox" class="commentbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="preloadtitle" class="mw-inputbox-input commentboxInput mw-ui-input mw-ui-input-inline" placeholder="" size="50" dir="ltr" /><input type="hidden" value="new" name="section" /><input type="hidden" name="title" /><br /><input type="submit" name="create" value="New section" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -207,7 +207,7 @@ InputBox type=fulltext
|
|||
type=fulltext
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /><input type="hidden" value="Search" name="fulltext" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="fulltext" value="Search full text" class="mw-ui-button" /><input type="hidden" value="Search" name="fulltext" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -217,7 +217,7 @@ InputBox type=move
|
|||
type=move
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="movebox" class="mw-movebox" action="/index.php" method="get"><input type="hidden" value="Special:MovePage/" name="title" /><input type="hidden" name="wpReason" /><input type="hidden" name="prefix" /><input name="wpNewTitle" class="mw-inputbox-input mw-moveboxInput mw-ui-input mw-ui-input-inline" placeholder="" size="50" dir="ltr" /><br /><input type="submit" class="mw-ui-button mw-ui-progressive" value="Move page" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="movebox" class="mw-movebox" action="/index.php" method="get"><input type="hidden" value="Special:MovePage/" name="title" /><input type="hidden" name="wpReason" /><input type="hidden" name="prefix" /><input name="wpNewTitle" class="mw-inputbox-input mw-moveboxInput mw-ui-input mw-ui-input-inline" placeholder="" size="50" dir="ltr" /><br /><input type="submit" value="Move page" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -228,7 +228,7 @@ type=search
|
|||
tour=test
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" /><input type="hidden" value="test" name="tour" /><br /><input type="submit" name="go" class="mw-ui-button" value="Try exact match" /> <input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" /><input type="hidden" value="test" name="tour" /><br /><input type="submit" name="go" value="Try exact match" class="mw-ui-button" /> <input type="submit" name="fulltext" value="Search full text" class="mw-ui-button" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -242,7 +242,7 @@ default=-{sr-Latn: Some latin; sr-Cyrl: Not latin }-
|
|||
placeholder=-{sr-Latn: Latn; sr-Cyrl: Cyrl}-
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline mw-inputbox-createbox" value="Some latin" placeholder="Latn" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="Napravi stranicu" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input name="title" class="mw-inputbox-input mw-inputbox-createbox mw-ui-input mw-ui-input-inline" value="Some latin" placeholder="Latn" required="" size="50" dir="ltr" /><br /><input type="submit" name="create" value="Napravi stranicu" class="mw-ui-button mw-ui-progressive" /></form></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
|
@ -253,5 +253,5 @@ type=search
|
|||
arialabel=Search this wiki
|
||||
</inputbox>
|
||||
!! html
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" aria-label="Search this wiki" /><br /><input type="submit" name="go" class="mw-ui-button" value="Try exact match" /> <input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /></form></div>
|
||||
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input mw-searchInput searchboxInput mw-ui-input mw-ui-input-inline" name="search" placeholder="" size="50" dir="ltr" aria-label="Search this wiki" /><br /><input type="submit" name="go" value="Try exact match" class="mw-ui-button" /> <input type="submit" name="fulltext" value="Search full text" class="mw-ui-button" /></form></div>
|
||||
!! end
|
||||
|
|
Loading…
Reference in a new issue