Add console log to design submit modal

This commit is contained in:
weeman 2024-01-29 10:54:41 +01:00 committed by Igor Scheller
parent e47da9b8dd
commit c03ccf94c7
2 changed files with 6 additions and 1 deletions

View File

@ -10,4 +10,9 @@ ready(() => {
element.addEventListener('submit', preventDefault);
element.addEventListener('click', preventDefault);
});
document.getElementById('delete-form')?.addEventListener('submit', (event) => {
event.preventDefault();
console.log('Delete confirmed');
});
});

View File

@ -421,7 +421,7 @@
{{ f.submit('Go!') }}
</form>
<code>f.delete(label, opt)</code>
<form class="prevent-default">
<form id="delete-form">
{{ f.delete('Delete it', {'confirm_title': 'Delete some item'}) }}
</form>
</div>