function bagApprove() {
var approvetext = prompt("Enter an optional comment");
if (approvetext == null)
var approvetext == '';
else
var approvetext == approvetext + ' ';
document.editform.wpTextbox1.value = '{' + '{' + 'subst' + ':BT|Approved' + '}' + '}' + '<br' + ' />' + document.editform.wpTextbox1.value + ':' + '{' + '{' + 'BotApproved' + '}' + '} ' + approvetext + 'Good Luck.' + ' ~' + '~' + '~' + '~' + '<br' + ' />' + '{' + '{' + 'subst' + ':BB' + '}' + '}';
document.editform.wpSummary.value = 'Approved';
document.editform.wpMinoredit.checked = false;
}
function bagDeny() {
var denytext = prompt("Enter an optional comment");
if (denytext == null)
var denytext == '';
else
var denytext == denytext + ' ';
document.editform.wpTextbox1.value = '{' + '{' + 'subst' + ':BT|Denied' + '}' + '}' + '<br' + ' />' + document.editform.wpTextbox1.value + ':' + '{' + '{' + 'BotDenied' + '}' + '} ' + denytext + ' ~' + '~' + '~' + '~' + '<br' + ' />' + '{' + '{' + 'subst' + ':BB' + '}' + '}';
document.editform.wpSummary.value = 'Denied';
document.editform.wpMinoredit.checked = false;
}
function bagExpire() {
var expiretext = prompt("Enter an optional comment");
if (expiretext == null)
var expiretext == '';
else
var expiretext == expiretext + ' ';
document.editform.wpTextbox1.value = '{' + '{' + 'subst' + ':BT|Expired' + '}' + '}' + '<br' + ' />' + document.editform.wpTextbox1.value + ':' + '{' + '{' + 'BotExpired' + '}' + '} ' + expiretext + ' ~' + '~' + '~' + '~' + '<br' + ' />' + '{' + '{' + 'subst' + ':BB' + '}' + '}';
document.editform.wpSummary.value = 'Expired';
document.editform.wpMinoredit.checked = false;
}
addOnloadHook(function() {
if (document.editform) {
addPortletLink("p-cactions", "javascript:bagExpire()", "expire", "ca-expire", "Expire this request", "");
addPortletLink("p-cactions", "javascript:bagApprove()", "approve", "ca-approve", "Approve this request", "");
addPortletLink("p-cactions", "javascript:bagDeny()", "deny", "ca-deny", "Deny this request", "");
}
});