From c03ccf94c77e2e0bcb47bab79630d35d48254b17 Mon Sep 17 00:00:00 2001 From: weeman Date: Mon, 29 Jan 2024 10:54:41 +0100 Subject: [PATCH] Add console log to design submit modal --- resources/assets/js/design.js | 5 +++++ resources/views/pages/design.twig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/design.js b/resources/assets/js/design.js index f6dc09a3..1437a8d3 100644 --- a/resources/assets/js/design.js +++ b/resources/assets/js/design.js @@ -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'); + }); }); diff --git a/resources/views/pages/design.twig b/resources/views/pages/design.twig index b7bb816d..21fc9f74 100644 --- a/resources/views/pages/design.twig +++ b/resources/views/pages/design.twig @@ -421,7 +421,7 @@ {{ f.submit('Go!') }} f.delete(label, opt) -
+ {{ f.delete('Delete it', {'confirm_title': 'Delete some item'}) }}