1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

Modal when pdf is signed

This commit is contained in:
Vincent LAURENT 2022-03-31 19:29:39 +02:00
parent 3665f31c11
commit c0108da53a
3 changed files with 26 additions and 3 deletions

View File

@ -208,7 +208,7 @@ $f3->route('POST /share',
array_map('unlink', $svgFiles); array_map('unlink', $svgFiles);
} }
$f3->reroute('/signature/'.$hash); $f3->reroute('/signature/'.$hash."#informations");
} }
); );
@ -302,7 +302,7 @@ $f3->route('POST /signature/@hash/save',
array_map('unlink', $svgFiles); array_map('unlink', $svgFiles);
} }
$f3->reroute('/signature/'.$f3->get('PARAMS.hash')); $f3->reroute('/signature/'.$f3->get('PARAMS.hash')."#signed");
} }
); );

View File

@ -960,6 +960,11 @@ var pageSignature = async function(url) {
modalInformations.show(); modalInformations.show();
} }
if(window.location.hash == '#signed') {
let modalSigned = new bootstrap.Modal(document.getElementById('modal-signed'));
modalSigned.show();
}
let filename = url.replace('/pdf/', ''); let filename = url.replace('/pdf/', '');
document.title = filename + ' - ' + document.title; document.title = filename + ' - ' + document.title;
document.getElementById('page-upload').classList.add('d-none'); document.getElementById('page-upload').classList.add('d-none');

View File

@ -168,7 +168,7 @@
<input id="input-share-link" type="text" onclick="this.select(); this.setSelectionRange(0, 99999);" readonly="readonly" class="form-control" value="<?php echo $shareLink ?>"> <input id="input-share-link" type="text" onclick="this.select(); this.setSelectionRange(0, 99999);" readonly="readonly" class="form-control" value="<?php echo $shareLink ?>">
<button onclick="navigator.clipboard.writeText(document.getElementById('input-share-link').value); this.innerText = 'Copié !';" autofocus="autofocus" class="btn btn-primary" type="button" id="btn-copy-share-link"><i class="bi bi-clipboard"></i> Copier</button> <button onclick="navigator.clipboard.writeText(document.getElementById('input-share-link').value); this.innerText = 'Copié !';" autofocus="autofocus" class="btn btn-primary" type="button" id="btn-copy-share-link"><i class="bi bi-clipboard"></i> Copier</button>
</div> </div>
<p>C'est aussi depuis cette page qu'il est possible de télécharger le PDF signer par tous.</p> <p>C'est aussi depuis cette page qu'il est possible de télécharger le PDF signer par tous le monde.</p>
</div> </div>
<div class="modal-footer text-start"> <div class="modal-footer text-start">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">Fermer</button> <button type="button" class="btn btn-light" data-bs-dismiss="modal">Fermer</button>
@ -177,6 +177,24 @@
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if(isset($hash)): ?>
<div id="modal-signed" class="modal" tabindex="-1">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><i class="bi bi-check-circle text-success"></i> PDF Signé</h5>
<!--<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>-->
</div>
<div class="modal-body">
<p>Merci, votre signature a bien été prise en compte !</p>
</div>
<div class="modal-footer text-center d-block">
<a class="btn btn-sm btn-light" href="/signature/<?php echo $hash ?>/pdf"><i class="bi bi-download"></i> Télécharger le PDF</a>
</div>
</div>
</div>
</div>
<?php endif; ?>
<span id="is_mobile" class="d-md-none"></span> <span id="is_mobile" class="d-md-none"></span>