Revert "Update specialblock target text to use usersmultiselect."

This reverts commit 0aa3d208a3 and
c71406a1cc.

Reason for revert: Proper handling of complete input should be done
in the CheckUser extension instead of changing the input field type.

Bug: T334870
Change-Id: Ic5681b297ba2c4f3603c578d98b058639217645c
This commit is contained in:
Func 2023-04-01 10:00:36 +00:00 committed by Thalia
parent ca662511da
commit ae7bb57ea4
3 changed files with 5 additions and 15 deletions

View file

@ -254,8 +254,7 @@ class SpecialBlock extends FormSpecialPage {
$a = [];
$a['Target'] = [
'type' => 'usersmultiselect',
'max' => 1,
'type' => 'user',
'ipallowed' => true,
'iprange' => true,
'id' => 'mw-bi-target',

View file

@ -2029,7 +2029,7 @@ return [
'mediawiki.widgets.SelectWithInputWidget',
'mediawiki.widgets.NamespacesMultiselectWidget',
'mediawiki.widgets.TitlesMultiselectWidget',
'mediawiki.widgets.UsersMultiselectWidget',
'mediawiki.widgets.UserInputWidget',
'mediawiki.util',
'mediawiki.htmlform',
'moment',

View file

@ -42,7 +42,7 @@
}
function updateBlockOptions() {
var blocktarget = blockTargetWidget.getValue().toString().trim(),
var blocktarget = blockTargetWidget.getValue().trim(),
isEmpty = blocktarget === '',
isIp = mw.util.isIPAddress( blocktarget, true ),
isNonEmptyIp = isIp && !isEmpty,
@ -111,9 +111,9 @@
blockTargetWidget = infuseIfExists( $wpTarget );
if ( blockTargetWidget ) {
blockTargetWidget.on( 'change', function () {
updateWatchOption( blockTargetWidget.getValue().toString().trim() );
updateWatchOption( blockTargetWidget.getValue().trim() );
} );
updateWatchOption( blockTargetWidget.getValue().toString().trim() );
updateWatchOption( blockTargetWidget.getValue().trim() );
}
return;
}
@ -123,15 +123,6 @@
blockTargetWidget = infuseIfExists( $( '#mw-bi-target' ) );
if ( blockTargetWidget ) {
// If widget is prefilled with an IP address, make it editable at first
if ( mw.util.isIPAddress( mw.config.get( 'wgRelevantUserName' ) ) ) {
blockTargetWidget.removeItems( blockTargetWidget.getItems() );
blockTargetWidget.input
.setValue( mw.config.get( 'wgRelevantUserName' ) )
.focus();
blockTargetWidget.menu.toggle( false );
}
userChangedCreateAccount = mw.config.get( 'wgCreateAccountDirty' );
updatingBlockOptions = false;