confirmationDialog Examples
window.e.utils.v2.ui.confirmationDialog.openConsequential
<div class="e-buttongroup">
<a class="e-btn" href="#0" id="consequentialDialog">
Open Consequential Dialog
</a>
</div>
document.getElementById('consequentialDialog').addEventListener('click', function() {
window.e.utils.v2.ui.confirmationDialog.openConsequential({
headline: 'Launch Campaign Now?',
content: 'The email will be sent to an estimated 8 123 382 contacts.',
footerClose: true,
confirm: {
label: 'Launch Campaign',
callback() {
console.log('Confirm clicked');
}
},
});
});
window.e.utils.v2.ui.confirmationDialog.openDestructive
<div class="e-buttongroup">
<a class="e-btn" href="#0" id="destructiveDialog">
Open Destructive Dialog
</a>
</div>
document.getElementById('destructiveDialog').addEventListener('click', function() {
window.e.utils.v2.ui.confirmationDialog.openDestructive({
headline: 'Delete This?',
content: 'Once deleted, it cannot be accessed anymore.',
footerClose: true,
confirm: {
label: 'Delete',
callback() {
console.log('Delete clicked');
}
},
});
});