diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php index 8d04732aea4..63049b27877 100644 --- a/htdocs/core/ajax/onlineSign.php +++ b/htdocs/core/ajax/onlineSign.php @@ -1,7 +1,6 @@ - */ -/* + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or @@ -18,7 +17,7 @@ /** * \file /htdocs/core/ajax/onlineSign.php - * \brief File to make Ajax action on Knowledge Management + * \brief File to make Ajax action to add the signature of a document */ if (!defined('NOTOKENRENEWAL')) { @@ -172,7 +171,7 @@ if ($action == "importSignature") { $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); $pdf->useTemplate($tppl); - if (getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES")) { + if (getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES") || getDolGlobalInt("PROPAL_SIGNATURE_ON_SPECIFIC_PAGE") == $i) { // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF // TODO Get position of box from PDF template @@ -189,7 +188,7 @@ if ($action == "importSignature") { } } - if (!getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES")) { + if (!getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES") && !getDolGlobalInt("PROPAL_SIGNATURE_ON_SPECIFIC_PAGE")) { // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF // TODO Get position of box from PDF template @@ -636,7 +635,7 @@ if ($action == "importSignature") { } } else { $error++; - $response = "cannot find Rib"; + $response = "cannot find BAN/RIB"; } if (!$error) { @@ -693,7 +692,7 @@ echo $response; /** - * Output the signature file + * Output the signature file into the PDF object. * * @param TCPDF $pdf PDF handler * @param Translate $langs Language diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index ea96b993db3..49345dc7778 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -208,6 +208,8 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') { $object->fetch(0, $ref); } +// $action == "dosign" is handled later... + /* * View