mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-14 09:44:44 +00:00
Merge "Convert Special:AbuseFilter/examine to HTMLForm"
This commit is contained in:
commit
30534924c4
|
@ -28,31 +28,30 @@ class AbuseFilterViewExamine extends AbuseFilterView {
|
|||
}
|
||||
|
||||
function showSearch() {
|
||||
// Add selector
|
||||
$selector = '';
|
||||
|
||||
$selectFields = array(); # Same fields as in Test
|
||||
$selectFields['abusefilter-test-user'] = Xml::input( 'wpSearchUser', 45, $this->mSearchUser );
|
||||
$selectFields['abusefilter-test-period-start'] =
|
||||
Xml::input( 'wpSearchPeriodStart', 45, $this->mSearchPeriodStart );
|
||||
$selectFields['abusefilter-test-period-end'] =
|
||||
Xml::input( 'wpSearchPeriodEnd', 45, $this->mSearchPeriodEnd );
|
||||
|
||||
$selector .= Xml::buildForm( $selectFields, 'abusefilter-examine-submit' );
|
||||
$selector .= Html::hidden( 'submit', 1 );
|
||||
$selector .= Html::hidden( 'title', $this->getTitle( 'examine' )->getPrefixedDBkey() );
|
||||
$selector = Xml::tags( 'form',
|
||||
array(
|
||||
'action' => $this->getTitle( 'examine' )->getLocalURL(),
|
||||
'method' => 'get'
|
||||
$formDescriptor = array(
|
||||
'SearchUser' => array(
|
||||
'label-message' => 'abusefilter-test-user',
|
||||
'type' => 'user',
|
||||
'default' => $this->mSearchUser,
|
||||
),
|
||||
'SearchPeriodStart' => array(
|
||||
'label-message' => 'abusefilter-test-period-start',
|
||||
'type' => 'text',
|
||||
'default' => $this->mSearchPeriodStart,
|
||||
),
|
||||
'SearchPeriodEnd' => array(
|
||||
'label-message' => 'abusefilter-test-period-end',
|
||||
'type' => 'text',
|
||||
'default' => $this->mSearchPeriodEnd,
|
||||
),
|
||||
$selector
|
||||
);
|
||||
$selector = Xml::fieldset(
|
||||
$this->msg( 'abusefilter-examine-legend' )->text(),
|
||||
$selector
|
||||
);
|
||||
$this->getOutput()->addHTML( $selector );
|
||||
$htmlForm = HTMLForm::factory( 'table', $formDescriptor, $this->getContext() );
|
||||
$htmlForm->setWrapperLegendMsg( 'abusefilter-examine-legend' )
|
||||
->addHiddenField( 'submit', 1 )
|
||||
->setSubmitTextMsg( 'abusefilter-examine-submit' )
|
||||
->setMethod( 'get' )
|
||||
->prepareForm()
|
||||
->displayForm( false );
|
||||
|
||||
if ( $this->mSubmit ) {
|
||||
$this->showResults();
|
||||
|
|
Loading…
Reference in a new issue