Add custom confirm message to standard joomla 3.0 admin toolbar button.
I can get alert messages on delete when I don't selected any check boxes on detailed list.
I can get same on any button by set last parameter true in
JToolBarHelper::custom('userdetails.sendMail', 'mail.png', 'mail_f2.png', 'Send Mail', false);
I want to add a confirm message on the click event of this Button?
On view file (tpl/view file name).
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'userdetails.sendMail')
{
if (confirm(Joomla.JText._('Do you really want to send mails to selected users?'))) {
Joomla.submitform(task);
} else {
return false;
}
}
}
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With