mirror of
https://github.com/24eme/signaturepdf
synced 2026-03-14 13:55:44 +01:00
custom retention period in configuration file
This commit is contained in:
parent
5999971c74
commit
161df8d421
3 changed files with 39 additions and 1 deletions
9
app.php
9
app.php
|
|
@ -117,6 +117,15 @@ $f3->route('GET /signature',
|
|||
$f3->set('noSharingMode', true);
|
||||
}
|
||||
|
||||
if ($f3->exists('signature')) {
|
||||
$retentions = [];
|
||||
foreach ($f3->get('signature.retention') ?? [] as $retention) {
|
||||
$r = explode(':', $retention);
|
||||
$retentions[$r[0]] = $r[1];
|
||||
}
|
||||
$f3->set('signatureRetention', $retentions);
|
||||
}
|
||||
|
||||
$f3->set('activeTab', 'sign');
|
||||
|
||||
echo View::instance()->render('signature.html.php');
|
||||
|
|
|
|||
|
|
@ -29,3 +29,16 @@ PDF_STORAGE_PATH=/path/to/folder
|
|||
|
||||
; Enable the edition of local server pdf metadata
|
||||
; PDF_LOCAL_PATH=/path/to/pdf/metadata/edition
|
||||
|
||||
; Custom options for the signature page
|
||||
;[signature]
|
||||
|
||||
; Enable custom retention period for shared PDF
|
||||
; This override the default retention periods
|
||||
; Warning: Text on the right of the colon will be translated according to the .po files
|
||||
;retention.0="+1 year:for one year"
|
||||
;retention.1="+6 months:for six months"
|
||||
;retention.2="+1 month:for one month"
|
||||
;retention.3="+1 week:for one week"
|
||||
;retention.4="+1 day:for one day"
|
||||
;retention.5="+1 hour:for one hour"
|
||||
|
|
|
|||
|
|
@ -198,7 +198,23 @@
|
|||
<div class="modal-body">
|
||||
<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><?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>
|
||||
<p><?php echo sprintf(_("%s The PDF will be kept"), '<i class="bi bi-hourglass-split"></i>'); ?>
|
||||
<?php if (isset($signatureRetention)): ?>
|
||||
<select name='duration' form='form_sharing'>
|
||||
<?php foreach ($signatureRetention as $value => $text): ?>
|
||||
<option value='<?php echo $value ?>'><?php echo _("$text"); ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<?php else: ?>
|
||||
<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 endif ?> <?php echo _("after the last signature."); ?></p>
|
||||
<?php if ($PDF_STORAGE_ENCRYPTION): ?>
|
||||
<p><i class="bi bi-lock-fill"></i> <input type="checkbox" id="checkbox_encryption" name="encryption" value="true" checked="checked" form='form_sharing'/>
|
||||
<label for="checkbox_encryption"><?php echo _("The PDF will be stored encrypted on the server"); ?></label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue