Show confirm dialog when deleting an invite (if the user has already entered an email address)

This commit is contained in:
Zach Copley
2011-05-11 16:00:35 -07:00
parent 04a593487a
commit 84c8ffc28a
3 changed files with 46 additions and 5 deletions

View File

@@ -248,11 +248,25 @@ class DomainWhitelistPlugin extends Plugin
*/
function onStartShowInviteForm($action)
{
$this->showConfirmDialog($action);
$form = new WhitelistInviteForm($action, $this->getWhitelist());
$form->show();
return false;
}
function showConfirmDialog($action)
{
// For JQuery UI modal dialog
$action->elementStart(
'div',
// TRANS: Title for invitiation deletion dialog.
array('id' => 'confirm-dialog', 'title' => _m('Confirmation Required'))
);
// TRANS: Confirmation text for invitation deletion dialog.
$action->text(_m('Really delete this invitation?'));
$action->elementEnd('div');
}
/**
* This is a bit of a hack. We take the values from the custom
* whitelist invite form and reformat them so they look like