Merge pull request #17518 from bb2a/add_option_pdf_global_with_picture
[NEW] PDF width picture option
This commit is contained in:
commit
99a939df57
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -41,17 +41,12 @@ if (!$user->admin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($cancel) {
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
|
if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
|
||||||
dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
|
||||||
@ -62,6 +57,9 @@ if ($action == 'update') {
|
|||||||
if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
|
if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
|
||||||
|
dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOST("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
|
||||||
@ -92,45 +90,47 @@ $tooltiptext = '';
|
|||||||
print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
|
print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Proposal"), '', '');
|
if (!empty($conf->propal->enabled)) {
|
||||||
|
print load_fiche_titre($langs->trans("Proposal"), '', '');
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table summary="more" class="noborder centpercent">';
|
print '<table summary="more" class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE");
|
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE");
|
||||||
print ' <span class="opacitymedium">('.$langs->trans("RandomlySelectedIfSeveral").')</span>';
|
print ' <span class="opacitymedium">('.$langs->trans("RandomlySelectedIfSeveral").')</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
|
print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
|
||||||
} else {
|
} else {
|
||||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
|
print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
/*
|
||||||
|
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").'</td><td>';
|
||||||
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
/*
|
print '<br><div class="center">';
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").'</td><td>';
|
print '<input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||||
if ($conf->use_javascript_ajax) {
|
|
||||||
print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
|
|
||||||
} else {
|
|
||||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
|
||||||
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
/*
|
|
||||||
print $form->buttonsSaveCancel();
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2004,7 +2004,8 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF
|
|||||||
MAIN_PDF_MARGIN_TOP=Top margin on PDF
|
MAIN_PDF_MARGIN_TOP=Top margin on PDF
|
||||||
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
|
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
|
||||||
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
|
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
|
||||||
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line
|
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add column for picture on proposal lines
|
||||||
|
MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Width of the column if a picture is added on lines
|
||||||
MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame
|
MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame
|
||||||
MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipent address frame
|
MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipent address frame
|
||||||
MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code
|
MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user