diff --git a/app.php b/app.php index e92cc92..391014f 100644 --- a/app.php +++ b/app.php @@ -57,6 +57,8 @@ $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); @@ -185,7 +187,7 @@ $f3->route('POST /share', if(!count($files)) { $f3->error(403); } - $f3->reroute('/signature/'.$hash); + $f3->reroute('/signature/'.$hash."#informations"); } ); diff --git a/public/js/signature.js b/public/js/signature.js index 3da414c..0579a09 100644 --- a/public/js/signature.js +++ b/public/js/signature.js @@ -938,6 +938,12 @@ var pageUpload = async function() { } var pageSignature = async function(url) { + + if(window.location.hash == '#informations') { + let modalInformations = new bootstrap.Modal(document.getElementById('modal-share-informations')); + modalInformations.show(); + } + let filename = url.replace('/pdf/', ''); document.title = filename + ' - ' + document.title; document.getElementById('page-upload').classList.add('d-none'); @@ -986,6 +992,7 @@ var pageSignature = async function(url) { return; } + if(window.location.hash && window.location.hash.match(/^\#http/)) { let hashUrl = window.location.hash.replace(/^\#/, ''); pageUpload(); diff --git a/templates/signature.html.php b/templates/signature.html.php index 54e955e..cdff974 100644 --- a/templates/signature.html.php +++ b/templates/signature.html.php @@ -35,6 +35,7 @@
Signature du PDF
+

document.pdf

@@ -75,7 +76,7 @@
- +
@@ -148,7 +149,30 @@
- + + + + +