User:Chaotic Enby/Unblock wizard.js: Difference between revisions

From Test Wiki
Content deleted Content added
a lot of this code is really just monkey see monkey do, and me copy-pasting things wherever it's plausible
hlep
Line 54: Line 54:
"future-promo-label": "If unblocked, would you make edits outside of that topic?",
"future-promo-label": "If unblocked, would you make edits outside of that topic?",
"username-label": "If required, what new username do you want to pick?",
"username-label": "If required, what new username do you want to pick?",
"clarification-label": "Is there anything specific you want to ask about your block?",
"submit-label": "Submit",
"submit-label": "Submit",
"footer-text": "<small>If you are not sure about what to enter in a field, you can skip it. If you need help, you can ask on <b>[[Special:MyTalk|your talkpage]]</b> with <b>{{[[Template:Help me|Help me]]}}</b> or get live help via <b>[[WP:IRCHELP|IRC]]</b> or <b>[[WP:DISCORD|Discord]]</b>.<br>Facing some issues in using this form? <b>[/w/index.php?title=User_talk:Chaotic_Enby&action=edit&section=new&preloadtitle=Issue%20with%20submission%20form&editintro=User_talk:Chaotic_Enby/editintro Report it]</b>.</small>",
"footer-text": "<small>If you are not sure about what to enter in a field, you can skip it. If you need help, you can ask on <b>[[Special:MyTalk|your talkpage]]</b> with <b>{{[[Template:Help me|Help me]]}}</b> or get live help via <b>[[WP:IRCHELP|IRC]]</b> or <b>[[WP:DISCORD|Discord]]</b>.<br>Facing some issues in using this form? <b>[/w/index.php?title=User_talk:Chaotic_Enby&action=edit&section=new&preloadtitle=Issue%20with%20submission%20form&editintro=User_talk:Chaotic_Enby/editintro Report it]</b>.</small>",
Line 78: Line 79:


var questionLabels = [];
var questionLabels = [];
var questionFields = {'explain': 0, 'future': 0, 'other': 0, 'explain-promo': 0, 'coi': 0, 'future-promo': 0, 'username': 1};
var questionFields = {'explain': 0, 'future': 0, 'other': 0, 'explain-promo': 0, 'coi': 0, 'future-promo': 0, 'username': 1, 'clarification': 0};


var blockType = '';
var blockType = '';
Line 128: Line 129:
case "Other":
case "Other":
questionLabels = ['explain', 'future', 'other'];
questionLabels = ['explain', 'future', 'other'];
break;
case "Clarification":
questionLabels = ['clarification'];
break;
break;
default:
default:
Line 482: Line 486:
} else {
} else {
unblock += '\n\u003Cnowiki>{{unblock-auto|2=REASON|3=THE BLOCKING ADMIN|4=BLOCK ID}}\u003C/nowiki>\n';
unblock += '\n\u003Cnowiki>{{unblock-auto|2=REASON|3=THE BLOCKING ADMIN|4=BLOCK ID}}\u003C/nowiki>\n';
}
break;
case "Clarification":
if(ui.itemsInput[0].getValue()){
unblock += '\n{{Help me}}\n' + ui.itemsInput[0].getValue() + '\n~~' + '~~';
} else {
unblock += '\n{{Help me}}\n' + 'I would like a more detailed explanation of the reason for my block.' + '\n~~' + '~~';
}
}
break;
break;