From 0c34e442cdfcc8eecee6d89d5b9eb7999599f429 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Fri, 1 Apr 2022 15:03:50 +0200 Subject: [PATCH] Share link in sharing mode --- public/js/signature.js | 8 ++++++-- templates/signature.html.php | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/public/js/signature.js b/public/js/signature.js index 419f61d..ca195d0 100644 --- a/public/js/signature.js +++ b/public/js/signature.js @@ -940,7 +940,9 @@ var modalSharing = function() { let modalInformations = bootstrap.Modal.getOrCreateInstance(modalInformationsEl); modalInformations.show(); modalInformationsEl.addEventListener('hidden.bs.modal', function (event) { - history.pushState({}, '', window.location.href.replace(/#.*$/, '')); + if(window.location.hash) { + history.pushState({}, '', window.location.href.replace(/#.*$/, '')); + } }) } @@ -949,7 +951,9 @@ var modalSharing = function() { let modalSigned = bootstrap.Modal.getOrCreateInstance(modalSignedEl); modalSigned.show(); modalSignedEl.addEventListener('hidden.bs.modal', function (event) { - history.pushState({}, '', window.location.href.replace(/#.*$/, '')); + if(window.location.hash) { + history.pushState({}, '', window.location.href.replace(/#.*$/, '')); + } }) } } diff --git a/templates/signature.html.php b/templates/signature.html.php index c4a3f42..e285d95 100644 --- a/templates/signature.html.php +++ b/templates/signature.html.php @@ -91,7 +91,10 @@ - Télécharger le PDF +
+ Télécharger le PDF + +