diff --git a/public/js/signature.js b/public/js/signature.js index 2a05f82..27aa297 100644 --- a/public/js/signature.js +++ b/public/js/signature.js @@ -488,7 +488,12 @@ var createAndAddSvgInCanvas = function(canvas, item, x, y, height = null) { document.getElementById('save_mobile').removeAttribute('disabled'); } if(document.getElementById('btn_download')) { - document.getElementById('btn_download').classList.add('disabled'); + document.getElementById('btn_download').classList.remove('btn-outline-dark'); + document.getElementById('btn_download').classList.add('btn-outline-secondary'); + } + if(document.getElementById('btn_share')) { + document.getElementById('btn_share').classList.remove('btn-outline-dark'); + document.getElementById('btn_share').classList.add('btn-outline-secondary'); } @@ -940,7 +945,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 +956,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 ced9f76..43282f4 100644 --- a/templates/signature.html.php +++ b/templates/signature.html.php @@ -92,7 +92,10 @@

Nombre de signataire : 0

- Télécharger le PDF +
+ Télécharger le PDF + +