Skip to content

Commit

Permalink
[signature] text in modal signed to inform that none mail has been
Browse files Browse the repository at this point in the history
sended
  • Loading branch information
wincelau committed Oct 13, 2024
1 parent 4bc50d3 commit 9115747
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions public/js/signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,14 @@ function modalSharing() {
if(openModal == 'signed') {
let modalSignedEl = document.getElementById('modal-signed');
let modalSigned = bootstrap.Modal.getOrCreateInstance(modalSignedEl);

document.querySelector('#modal-signed #text_nomail_notification a').addEventListener('click', function() {
this.href = this.href.replace(/DOCUMENT_NAME/g, document.getElementById('text_document_name').title);
this.href = this.href.replace('DOCUMENT_URL', document.location.href);
});

document.querySelector('#modal-signed #text_nomail_notification a').href = document.getElementById('link_compose_mail').href;

modalSigned.show();
}
}
Expand Down
5 changes: 4 additions & 1 deletion templates/signature.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="mb-1"><i class="bi bi-check-circle text-success"></i> <?php echo _("Your signature has been successfully recorded!"); ?></p>
<p class="mb-1 text-success"><i class="bi bi-check-circle"></i> <?php echo _("Your signature has been successfully recorded!"); ?></p>
<p id="text_nomail_notification" class="mt-3 text-muted"><i class="bi bi-info-circle"></i> <?php echo _("This application does not automatically send an email. If you want to write one you can use <a>this pre-written email</a>") ?>
</p>
<a id="link_compose_mail" class="d-none" href="mailto:?<?php echo http_build_query(["subject" => sprintf(_("Signing the document : %s"), "DOCUMENT_NAME"), "body" => sprintf(_("Hello,\n\nI just signed the document (%s) : %s"), "DOCUMENT_NAME", "DOCUMENT_URL")], "", null, PHP_QUERY_RFC3986) ?>"></a>
</div>
<div class="modal-footer text-center d-block">
<a class="btn btn-outline-dark" href="<?php echo $REVERSE_PROXY_URL; ?>/signature/<?php echo $hash ?>/pdf"><i class="bi bi-download"></i> <?php echo _("Download the PDF"); ?></a>
Expand Down

0 comments on commit 9115747

Please sign in to comment.