User:BZPN/RfD.js: Difference between revisions
From Test Wiki
Content deleted Content added
No edit summary Tags: Mobile edit Mobile web edit |
No edit summary Tags: Mobile edit Mobile web edit |
||
| Line 31: | Line 31: | ||
'margin-bottom': '10px' |
'margin-bottom': '10px' |
||
}).appendTo(quickDeleteTab); |
}).appendTo(quickDeleteTab); |
||
$('<p>').html('Before proceeding with Quick Deletion, please read the <a href="/wiki/Template:QD" target="_blank">Template:QD</a> documentation and the <a href="/wiki/Wikipedia:Deletion_policy" target="_blank">Wikipedia Deletion Policy</a>.') |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
// Checkbox potwierdzający zapoznanie się z zasadami usuwania |
|||
const consentCheckbox = $('<input>').attr('type', 'checkbox').attr('id', 'consent-checkbox').css('margin-right', '10px'); |
|||
const consentLabel = $('<label>').attr('for', 'consent-checkbox').text('I have read and understand the deletion policy.'); |
|||
$('<div>').append(consentCheckbox).append(consentLabel).appendTo(quickDeleteTab); |
|||
$('<p>').text('Choose a reason for quick deletion from the list below:').css({ |
$('<p>').text('Choose a reason for quick deletion from the list below:').css({ |
||
| Line 45: | Line 56: | ||
}).appendTo(quickDeleteTab); |
}).appendTo(quickDeleteTab); |
||
// |
// Dodaj powody do listy |
||
const reasons = [ |
const reasons = [ |
||
{ value: 'A1', text: 'Little or no meaning' }, |
{ value: 'A1', text: 'Little or no meaning' }, |
||
| Line 52: | Line 63: | ||
{ value: 'A4', text: 'Does not say why it is notable' }, |
{ value: 'A4', text: 'Does not say why it is notable' }, |
||
{ value: 'A5', text: 'Not in English' }, |
{ value: 'A5', text: 'Not in English' }, |
||
{ value: 'A6', text: 'Hoax' } |
{ value: 'A6', text: 'Hoax' } |
||
// Dodaj inne powody |
// Dodaj inne powody w razie potrzeby |
||
]; |
]; |
||
// Dodaj powody do select |
|||
reasons.forEach(reason => { |
|||
| ⚫ | |||
$('<option>').attr('value', reason.value).text( |
quickDeleteSelect.append($('<option>').attr('value', reason.value).text(reason.text)); |
||
}); |
}); |
||
// Przycisk zatwierdzenia QD |
|||
$('<button>').text('Submit Quick Delete').css({ |
|||
'width': '100%', |
|||
'padding': '10px', |
|||
'background-color': '#d9534f', |
|||
'color': '#fff', |
|||
'border': 'none', |
|||
'border-radius': '5px', |
|||
'cursor': 'pointer', |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
const selectedReason = quickDeleteSelect.val(); |
|||
if (selectedReason) { |
|||
insertQuickDeleteTag(selectedReason); |
|||
} else { |
|||
alert('Please select a reason for quick deletion.'); |
|||
| ⚫ | |||
| ⚫ | |||
} |
} |
||