1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-06-04 23:12:25 +02:00

Disabled button download when save is needed

This commit is contained in:
Vincent LAURENT 2022-03-31 18:46:53 +02:00
parent 82e04e5116
commit 5a36382e27
2 changed files with 6 additions and 2 deletions

View file

@ -484,6 +484,10 @@ var createAndAddSvgInCanvas = function(canvas, item, x, y, height = null) {
if(document.getElementById('save_mobile')) {
document.getElementById('save_mobile').removeAttribute('disabled');
}
if(document.getElementById('btn_download')) {
document.getElementById('btn_download').classList.add('disabled');
}
if(!height) {
height = 100;

View file

@ -82,10 +82,10 @@
<button class="btn btn-primary w-100 mt-2" disabled="disabled" type="submit" id="save"><i class="bi bi-download"></i> Télécharger le PDF Signé</button>
</form>
<?php else: ?>
<a class="btn btn-outline-dark w-100" href="/signature/<?php echo $hash ?>/pdf"><i class="bi bi-download"></i> Télécharger le PDF</a>
<a id="btn_download" class="btn btn-outline-dark w-100" href="/signature/<?php echo $hash ?>/pdf"><i class="bi bi-download"></i> Télécharger le PDF</a>
<form id="form_pdf" action="/signature/<?php echo $hash ?>/save" method="post" enctype="multipart/form-data">
<input id="input_svg" name="svg[]" type="file" class="d-none" />
<button class="btn btn-success w-100 mt-2" disabled="disabled" type="submit" id="save"><i class="bi bi-check-circle"></i> Enregistrer ma signature</button>
<button class="btn btn-primary w-100 mt-2" disabled="disabled" type="submit" id="save"><i class="bi bi-check-circle"></i> Enregistrer ma signature</button>
</form>
<?php endif; ?>
</div>