mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Share link build with javascript
This commit is contained in:
parent
5e0c1abf45
commit
85d9250d1b
3
app.php
3
app.php
@ -57,9 +57,6 @@ $f3->route('GET /signature',
|
||||
$f3->route('GET /signature/@hash',
|
||||
function($f3, $param) {
|
||||
$f3->set('hash', $param['hash']);
|
||||
$port = $f3->get('PORT');
|
||||
$f3->set('shareLink', $f3->set('urlbase', $f3->get('SCHEME').'://'.$_SERVER['SERVER_NAME'].(!in_array($port,[80,443])?(':'.$port):'').$f3->get('BASE')).$f3->get('URI'));
|
||||
|
||||
$f3->set('maxSize', min(array(convertPHPSizeToBytes(ini_get('post_max_size')), convertPHPSizeToBytes(ini_get('upload_max_filesize')))));
|
||||
$f3->set('maxPage', ini_get('max_file_uploads') - 1);
|
||||
|
||||
|
@ -155,7 +155,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($shareLink)): ?>
|
||||
<?php if(isset($hash)): ?>
|
||||
<div id="modal-share-informations" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
@ -167,8 +167,9 @@
|
||||
<p>Plusieurs personnes peuvent signer ce PDF en même temps sur cette page.</p>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text">Lien à partager</span>
|
||||
<input id="input-share-link" type="text" onclick="this.select(); this.setSelectionRange(0, 99999);" readonly="readonly" class="form-control bg-light font-monospace" value="<?php echo $shareLink ?>">
|
||||
<input id="input-share-link" type="text" onclick="this.select(); this.setSelectionRange(0, 99999);" readonly="readonly" class="form-control bg-light font-monospace" value="">
|
||||
<button onclick="navigator.clipboard.writeText(document.getElementById('input-share-link').value); this.innerText = 'Copié !';" autofocus="autofocus" class="btn btn-primary" type="button" id="btn-copy-share-link"><i class="bi bi-clipboard"></i> Copier</button>
|
||||
<script>document.querySelector('#input-share-link').value = document.location.href.replace(/#.*/, '');</script>
|
||||
</div>
|
||||
<p>C'est aussi depuis cette page qu'il est possible de télécharger le PDF signé par tout le monde.</p>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user