User:Chaotic Enby/Unblock wizard.js: Difference between revisions
From Test Wiki
Content deleted Content added
Chaotic Enby (talk | contribs) No edit summary |
Chaotic Enby (talk | contribs) this should do it |
||
| Line 40: | Line 40: | ||
redirectionDelay: 1000, |
redirectionDelay: 1000, |
||
}; |
}; |
||
| ⚫ | |||
| ⚫ | |||
// TODO: move to a separate JSON subpage, would be feasible once [[phab:T198758]] is resolved |
// TODO: move to a separate JSON subpage, would be feasible once [[phab:T198758]] is resolved |
||
| Line 53: | Line 56: | ||
"coi-label": "What is your relationship with the subjects you have been editing about?", |
"coi-label": "What is your relationship with the subjects you have been editing about?", |
||
"future-promo-label": "If you are unblocked, what topic areas will you edit in?", |
"future-promo-label": "If you are unblocked, what topic areas will you edit in?", |
||
"username-label": " |
"username-label": (usernameBlock == "required" ? "What new username do you want to pick?" : "If your username was an issue, what new username do you want to pick?"), |
||
"standalone-username-label": "What new username do you want to pick?", |
"standalone-username-label": "What new username do you want to pick?", |
||
"clarification-label": "Is there anything specific you want to ask about your block?", |
"clarification-label": "Is there anything specific you want to ask about your block?", |
||
| Line 90: | Line 93: | ||
var questionLabels = []; |
var questionLabels = []; |
||
var questionFields = {'explain': 0, 'future': 0, 'other': 0, 'accounts': 0, 'so': 2, 'explain-promo': 0, 'coi': 0, 'future-promo': 0, 'username': 1, 'clarification': 0, 'standalone-username': 1}; |
var questionFields = {'explain': 0, 'future': 0, 'other': 0, 'accounts': 0, 'so': 2, 'explain-promo': 0, 'coi': 0, 'future-promo': 0, 'username': 1, 'clarification': 0, 'standalone-username': 1}; |
||
var required = {'explain': true, 'future': true, 'other': false, 'accounts': true, 'so': true, 'explain-promo': true, 'coi': true, 'future-promo': true, 'username': |
var required = {'explain': true, 'future': true, 'other': false, 'accounts': true, 'so': true, 'explain-promo': true, 'coi': true, 'future-promo': true, 'username': (usernameBlock == "required"), 'clarification': false, 'standalone-username': true}; |
||
var blockType = ''; |
var blockType = ''; |
||
| Line 96: | Line 99: | ||
var emptyFieldsWarned = false; |
var emptyFieldsWarned = false; |
||
var mainPosition = -1; |
var mainPosition = -1; |
||
| ⚫ | |||
| ⚫ | |||
function init() { |
function init() { |
||