Use OOUI datetime selectors on Special:AbuseFilter/examine

Bug: T58367
Bug: T58368
Change-Id: Ic7882e86c1cadd2501eca9a63623f0db3a0c614a
This commit is contained in:
Matěj Suchánek 2018-03-09 12:27:18 +01:00
parent e0d7f6a388
commit 3a0f6a48ba

View file

@ -28,6 +28,9 @@ class AbuseFilterViewExamine extends AbuseFilterView {
}
function showSearch() {
$RCMaxAge = $this->getConfig()->get( 'RCMaxAge' );
$min = wfTimestamp( TS_ISO_8601, time() - $RCMaxAge );
$max = wfTimestampNow();
$formDescriptor = [
'SearchUser' => [
'label-message' => 'abusefilter-test-user',
@ -36,13 +39,17 @@ class AbuseFilterViewExamine extends AbuseFilterView {
],
'SearchPeriodStart' => [
'label-message' => 'abusefilter-test-period-start',
'type' => 'text',
'type' => 'datetime',
'default' => $this->mSearchPeriodStart,
'min' => $min,
'max' => $max,
],
'SearchPeriodEnd' => [
'label-message' => 'abusefilter-test-period-end',
'type' => 'text',
'type' => 'datetime',
'default' => $this->mSearchPeriodEnd,
'min' => $min,
'max' => $max,
],
];
$htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() );