MediaWiki:Gadget-userRightsManager.js: Difference between revisions
From Test Wiki
Content deleted Content added
mNo edit summary Tag: Reverted |
m Undo edit before the rename; the changes made to the template links aren't applying to the gadget for some reason Tag: Manual revert |
||
| (20 intermediate revisions by 6 users not shown) | |||
| Line 10: | Line 10: | ||
'bureaucrat': 'Bureaucrat', |
'bureaucrat': 'Bureaucrat', |
||
'interface-admin': 'Interface administrator', |
'interface-admin': 'Interface administrator', |
||
'abusefilter-admin': 'Abuse filter administrator', |
|||
'non-steward-suppressor': 'Non-steward Suppressor', |
|||
} |
} |
||
var cannedResponses = { |
var cannedResponses = { |
||
'sysop': '{{ |
'sysop': '{{administrator granted}} ~~~~', |
||
'bureaucrat': '{{bureaucrat granted}} ~~~~', |
'bureaucrat': '{{bureaucrat granted}} ~~~~', |
||
'interface-admin': '{{ |
'interface-admin': '{{interface administrator granted}} ~~~~', |
||
' |
'abusefilter-admin': '{{done}}. ~~~~', |
||
}; |
}; |
||
| Line 73: | Line 73: | ||
disabled: !mw.config.get('wgUserGroups').includes('steward') |
disabled: !mw.config.get('wgUserGroups').includes('steward') |
||
}); |
}); |
||
this. |
this.groupsAbuseFilterInput = new OO.ui.CheckboxInputWidget({ |
||
selected: permissionText.includes(' |
selected: permissionText.includes('abusefilter-admin') && mw.config.get('wgUserGroups').includes('steward'), |
||
disabled: !mw.config.get('wgUserGroups').includes('steward') |
disabled: !mw.config.get('wgUserGroups').includes('steward') |
||
}); |
}); |
||
| Line 92: | Line 92: | ||
new OO.ui.FieldLayout(this.groupsBureaucratInput, {label: 'Bureaucrat', align: 'inline'}), |
new OO.ui.FieldLayout(this.groupsBureaucratInput, {label: 'Bureaucrat', align: 'inline'}), |
||
new OO.ui.FieldLayout(this.groupsInterfaceAdminInput, {label: 'Interface administrator', align: 'inline'}), |
new OO.ui.FieldLayout(this.groupsInterfaceAdminInput, {label: 'Interface administrator', align: 'inline'}), |
||
new OO.ui.FieldLayout(this. |
new OO.ui.FieldLayout(this.groupsAbuseFilterInput, {label: 'Abuse filter administrator', align: 'inline'}), |
||
] |
] |
||
}) |
}) |
||
| Line 132: | Line 132: | ||
if(this.groupsBureaucratInput.isSelected()) perms.push('bureaucrat'); |
if(this.groupsBureaucratInput.isSelected()) perms.push('bureaucrat'); |
||
if(this.groupsInterfaceAdminInput.isSelected()) perms.push('interface-admin'); |
if(this.groupsInterfaceAdminInput.isSelected()) perms.push('interface-admin'); |
||
if(this. |
if(this.groupsAbuseFilterInput.isSelected()) perms.push('abusefilter-admin'); |
||
var self = this, promiseCount = 2; |
var self = this, promiseCount = 2; |
||