User:Chaotic Enby/Unblock wizard.js: Difference between revisions
From Test Wiki
Content deleted Content added
Chaotic Enby (talk | contribs) only shows required fields and those that have been filled |
Chaotic Enby (talk | contribs) No edit summary |
||
| Line 516: | Line 516: | ||
unblock += '\n{{Help me}}\n' + 'I would like a more detailed explanation for my block.' + '\n~~' + '~~'; |
unblock += '\n{{Help me}}\n' + 'I would like a more detailed explanation for my block.' + '\n~~' + '~~'; |
||
} |
} |
||
break; |
|||
case "Username": |
|||
unblock += '\n{{unblock-un|username=' + ui.itemsInput[0].getValue() + '}} ~~' + '~~\n'; |
|||
break; |
break; |
||
default: |
default: |
||
unblockStart = '\n{{unblock|reason='; |
|||
for(var [i, label] of questionLabels.entries()){ |
for(var [i, label] of questionLabels.entries()){ |
||
if(required[label] || ui.itemsInput[i].getValue()) { |
if(required[label] || ui.itemsInput[i].getValue()) { |
||
if(label == "username") { |
|||
| ⚫ | |||
unblockStart = '\n{{unblock-un|username=' + ui.itemsInput[i].getValue() + '|reason='; |
|||
} else { |
|||
| ⚫ | |||
} |
|||
} |
} |
||
} |
} |
||
unblock |
unblock = unblockStart + unblock + '}} ~~' + '~~\n'; |
||
} |
} |
||