Confirming voicemail deletions in ARI?

Hi, when people currently delete voicemails using the ARI interface, there is no “Are you sure you want to delete?” message. Let’s say I wanted to add one… I found the relevant code in voicemail.module (see below), but what would the syntax be for adding a confirm/delete dialogue box?

Thanks in advance.

// get files
$files = array();
foreach($_REQUEST as $key => $value) {
if (preg_match(’/selected/’,$key)) {
array_push($files, $value);
}
}
if ($a==‘delete’) {
$this->deleteVoicemailData($files);
}
else if ($a==‘move_to’) {
$folder_rx = getArgument($args,‘folder_rx’);
if ($folder_rx==’’) {
$_SESSION[‘ari_error’]
= _(“A folder must be selected before the message can be moved.”);
}
else {
$context = $_SESSION[‘ari_user’][‘context’];
$extension = $_SESSION[‘ari_user’][‘extension’];
$this->moveVoicemailData($files, $context, $extension, $folder_rx);
}
}
else if ($a==‘forward_to’) {
$mailbox_rx = getArgument($args,‘mailbox_rx’);
list($context_rx,$extension_rx) = split(’/’,$mailbox_rx);
if ($extension_rx==’’) {
$_SESSION[‘ari_error’]
= _(“An extension must be selected before the message can be forwarded.”);
}
else {
$folder_rx = $ASTERISK_VOICEMAIL_FOLDERS[0][‘folder’];
$this->moveVoicemailData($files, $context_rx, $extension_rx, $folder_rx);
}
}