1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-21 23:26:38 +02:00

Add value in conf ini example, disabled input if the variable is set to

false
This commit is contained in:
Tanguy Le Faucheur 2023-11-22 18:40:56 +01:00
parent 677ed23596
commit a5a286b1c8
3 changed files with 11 additions and 1 deletions

View file

@ -81,6 +81,11 @@ $f3->route('GET /signature',
if(!$f3->get('PDF_STORAGE_PATH')) {
$f3->set('noSharingMode', true);
}
if (!$f3->exists('PDF_STORAGE_ENCRYPTION')) {
$f3->set('PDF_STORAGE_ENCRYPTION', '');
}
$f3->set('activeTab', 'sign');
echo View::instance()->render('signature.html.php');

View file

@ -15,3 +15,6 @@ PDF_STORAGE_PATH=/path/to/folder
;Declare your public domain here if you can't handle location rewriting through your reverse proxy.
;REVERSE_PROXY_URL=http://127.0.0.1:8080
; Encryption activation (default activation if GPG is installed)
;PDF_STORAGE_ENCRYPTION=true

View file

@ -193,7 +193,9 @@
<p><?php echo _("By enabling PDF sharing, you will be able to provide a link to the people of your choice so that they can sign this PDF."); ?></p>
<p><?php echo sprintf(_("%s This sharing requires the PDF to be transferred and stored on the server for future signers to access."), '<i class="bi bi-hdd-network"></i>'); ?></p>
<p class="mb-0"><?php echo sprintf(_("%s The PDF will be kept"), '<i class="bi bi-hourglass-split"></i>'); ?> <select name='duration' form='form_sharing'><option value='+1 year'><?php echo _("for one year"); ?></option><option value='+6 month'><?php echo _("for six months"); ?></option><option value='+1 month' selected='selected'><?php echo _("for one month"); ?></option><option value='+1 week'><?php echo _("for one week"); ?></option><option value='+1 day'><?php echo _("for one day"); ?></option><option value='+1 hour'><?php echo _("for one hour"); ?></option></select> <?php echo _("after the last signature."); ?></p>
<input type="radio" id="encryption" name="encryption" value="true" form='form_sharing' checked/> <label for="encryption"><?php echo _("Activate server side PDF encryption"); ?></label>
<div class="mt-3 <?php if (!$PDF_STORAGE_ENCRYPTION): ?>opacity-50<?php endif;?>"><i class="bi bi-lock-fill"></i> <input type="checkbox" id="encryption" name="encryption" value="true" form='form_sharing' <?php if (!$PDF_STORAGE_ENCRYPTION): ?>disabled="disabled"<?php else: ?>checked<?php endif; ?>/> <label for="encryption"><?php echo _("The PDF will be stored encrypted on the server"); ?></label>
</div>
</div>
<div class="modal-footer text-center d-block">
<form id="form_sharing" clas action="<?php echo $REVERSE_PROXY_URL; ?>/share" method="post" enctype="multipart/form-data">