1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-19 06:06:34 +02:00

Compare commits

...

2 commits

Author SHA1 Message Date
Tanguy Le Faucheur a5a286b1c8 Add value in conf ini example, disabled input if the variable is set to
false
2023-11-22 18:40:56 +01:00
Tanguy Le Faucheur 677ed23596 Add button to activate or deactivate cryptology 2023-11-22 17:21:54 +01:00
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,13 +193,15 @@
<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>
<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">
<input id="input_pdf_share" name="pdf" type="file" class="d-none" />
<input id="input_svg_share" name="svg[]" type="file" class="d-none" />
<input id="input_pdf_hash" name="hash" type="hidden" value="" />
<input id="input_symmetric_key" name="key" type="hidden" value="" />
<button class="btn col-9 col-md-6 btn-primary" type="submit" id="save_share"><?php echo sprintf(_("%s Start sharing"), '<i class="bi bi-cloud-upload"></i>'); ?></button>
</form>
</div>