MediaWiki:Gadget-twinkleblock.js: Difference between revisions
Content deleted Content added
Amorymeltzer (talk | contribs) Better fix |
Amorymeltzer (talk | contribs) Repo at f1b0573: Apply bugfix for always-on partialstatus |
||
Line 320:
field_block_options.append({ type: 'hidden', name: 'reblock', value: '1' });
}
}
Line 1,259 ⟶ 1,257:
toBlock = $form.find('[name=actiontype][value=block]').is(':checked'),
toWarn = $form.find('[name=actiontype][value=template]').is(':checked'),
blockoptions = {}, templateoptions = {};
Line 1,265 ⟶ 1,264:
blockoptions = Twinkle.block.field_block_options;
▲ if (!$form.find('[name=actiontype][value=partial]').is(':checked')) {
}▼
templateoptions = Twinkle.block.field_template_options;
Line 1,274 ⟶ 1,270:
delete blockoptions.expiry_preset; // remove extraneous
// Partial
if (toPartial) {
blockoptions.partial = templateoptions.partial = true;
▲ }
templateoptions.pagerestrictions = $form.find('[name=pagerestrictions]').val() || [];
templateoptions.namespacerestrictions = $form.find('[name=namespacerestrictions]').val() || [];
Line 1,282 ⟶ 1,279:
blockoptions.pagerestrictions = templateoptions.pagerestrictions.join('|');
blockoptions.namespacerestrictions = templateoptions.namespacerestrictions.join('|');
// use block settings as warn options where not supplied
templateoptions.summary = templateoptions.summary || blockoptions.reason;
|