mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
Convert Special:AbuseFilter/history to HTMLForm
Bug: T132284 Change-Id: I14b98e92fa9e5ad2401c046bbaacd4a98daa5cc0
This commit is contained in:
parent
f8391b5144
commit
3b6ca98c6e
|
@ -49,24 +49,23 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
);
|
||||
}
|
||||
|
||||
// Add filtering of changes et al.
|
||||
$fields['abusefilter-history-select-user'] = Xml::input( 'user', 45, $user );
|
||||
|
||||
$filterForm = Xml::buildForm( $fields, 'abusefilter-history-select-submit' );
|
||||
$filterForm .= "\n" . Html::hidden(
|
||||
'title',
|
||||
$this->getTitle( "history/$filter" )->getPrefixedDBkey()
|
||||
);
|
||||
$filterForm = Xml::tags( 'form',
|
||||
array(
|
||||
'action' => $this->getTitle( "history/$filter" )->getLocalURL(),
|
||||
'method' => 'get'
|
||||
),
|
||||
$filterForm
|
||||
$formDescriptor = array(
|
||||
'user' => array(
|
||||
'type' => 'user',
|
||||
'name' => 'user',
|
||||
'default' => $user,
|
||||
'size' => '45',
|
||||
'label-message' => 'abusefilter-history-select-user'
|
||||
)
|
||||
);
|
||||
$filterForm = Xml::fieldset( $this->msg( 'abusefilter-history-select-legend' )
|
||||
->text(), $filterForm );
|
||||
$out->addHTML( $filterForm );
|
||||
|
||||
$htmlForm = HTMLForm::factory( 'table', $formDescriptor, $this->getContext() );
|
||||
$htmlForm->setSubmitTextMsg( 'abusefilter-history-select-submit' )
|
||||
->setWrapperLegendMsg( 'abusefilter-history-select-legend' )
|
||||
->setAction( $this->getTitle( "history/$filter" )->getLocalURL() )
|
||||
->setMethod( 'get' )
|
||||
->prepareForm()
|
||||
->displayForm( false );
|
||||
|
||||
$pager = new AbuseFilterHistoryPager( $filter, $this, $user );
|
||||
$table = $pager->getBody();
|
||||
|
|
Loading…
Reference in a new issue