Skip to content

Comments

block: turn templating on by default only for registered accounts#2313

Open
IlyasLebleu wants to merge 1 commit intowikimedia-gadgets:masterfrom
IlyasLebleu:blockoptions3
Open

block: turn templating on by default only for registered accounts#2313
IlyasLebleu wants to merge 1 commit intowikimedia-gadgets:masterfrom
IlyasLebleu:blockoptions3

Conversation

@IlyasLebleu
Copy link
Contributor

Usually, IPs don't need a block template since it won't be visible, although the option is left available in case an administrator might want to leave a notice there for future use. Works as expected on test.wikipedia.org

tooltip: 'If the blocking admin forgot to issue a block template, or you have just blocked the user without templating them, you can use this to issue the appropriate template. Check the partial block box for partial block templates.',
// Disallow when viewing the block dialog on an IP range
checked: !Morebits.ip.isRange(relevantUserName),
checked: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be written as !mw.util.isIPAddress(relevantUserName, true) ? That will make it checked for registered accounts and temp accounts, and unchecked for IPs and IP ranges. No need to wait for fetch of user info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants