diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index dd803f2ad71..d71fe1f53da 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -137,7 +137,7 @@ if (isModEnabled('propal')) { print ''; print ''; - + /* This feature seems not yet used into Dolibarr. So option is kept hidden and enabled by default print ''; + */ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"), ''); print ''; @@ -148,6 +148,7 @@ if (isModEnabled('propal')) { print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING); } print '
'; print $form->textwithpicto($langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral")); diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 3d3d074a43e..468ed7cf215 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -884,6 +884,9 @@ class Conf extends stdClass if (!isset($this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { $this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT = 1; // allow html content into free footer text } + if (!isset($this->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING)) { + $this->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING = 1; + } // Default max file size for upload (deprecated) //$this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : (int) $this->global->MAIN_UPLOAD_DOC * 1024); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index f6e9129db62..1dff744dc28 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1767,6 +1767,8 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx, $tab_top + $tab_hl); $pdf->MultiCell($largcol, $tab_hl * 3, '', 1, 'R'); if (getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) { + // Can be retrieve with getSignatureAppearanceArray() + // Can be also detected by putting the mouse over the area when using evince pdf reader $pdf->addEmptySignatureAppearance($posx, $tab_top + $tab_hl, $largcol, $tab_hl * 3); } diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index e1fb0ff5d3a..b4be422e6b0 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -212,6 +212,7 @@ class pdf_cyan extends ModelePDFPropales $pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative } + $realpath = ''; $arephoto = false; foreach ($pdir as $midir) { if (!$arephoto) { @@ -1840,7 +1841,10 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($posx, $tab_top + $tab_hl); $pdf->MultiCell($largcol, $tab_hl * 3, '', 1, 'R'); + if (getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) { + // Can be retrieve with getSignatureAppearanceArray() + // Can be also detected by putting the mouse over the area when using evince pdf reader $pdf->addEmptySignatureAppearance($posx, $tab_top + $tab_hl, $largcol, $tab_hl * 3); } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index dd84562b4a6..693fe20b925 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2104,7 +2104,7 @@ MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code MAIN_PDF_HIDE_SENDER_NAME=Hide sender/company name in address block PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions PROPOSAL_PDF_HIDE_PAYMENTMODE=Hide payment mode -MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF +MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add a hidden markup into the signature area to allow electronic signature tool to reuse it. May be used by external tools or in a future by the online signature feature. NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.
For example:
CODEGRP1+CODEGRP2