From a7076e962a8c9a20d89c648d3a43ef103ffe3d3e Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 11 Nov 2021 00:34:15 +0100 Subject: [PATCH] =?UTF-8?q?Bouton=20pour=20r=C3=A9initialiser=20la=20trace?= =?UTF-8?q?=20de=20la=20signature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/app.js | 5 +++++ templates/pdf.html.php | 1 + 2 files changed, 6 insertions(+) diff --git a/public/js/app.js b/public/js/app.js index 5200428..109d3c2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -391,6 +391,11 @@ loadingTask.promise.then(function(pdf) { } }); + document.getElementById('signature-pad-reset').addEventListener('click', function(event) { + signaturePad.clear(); + event.preventDefault(); + }) + document.querySelectorAll('#modalAddSvg .nav-link').forEach(function(item) { item.addEventListener('shown.bs.tab', function (event) { var firstInput = document.querySelector(event.target.dataset.bsTarget).querySelector('input'); if(firstInput) { diff --git a/templates/pdf.html.php b/templates/pdf.html.php index 1a77c26..308cd6e 100644 --- a/templates/pdf.html.php +++ b/templates/pdf.html.php @@ -113,6 +113,7 @@