diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 0760b708a8c..c1736b854ca 100755 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -20,7 +20,7 @@ /** * \file htdocs/admin/pdf.php * \brief Page to setup PDF options - * \version $Id: pdf.php,v 1.1 2011/08/10 23:48:09 eldy Exp $ + * \version $Id: pdf.php,v 1.2 2011/08/11 01:34:54 eldy Exp $ */ require("../main.inc.php"); @@ -44,8 +44,10 @@ if (!$user->admin) if (isset($_POST["action"]) && $_POST["action"] == 'update') { + dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", $_POST["MAIN_PROFID1_IN_ADDRESS"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'',$conf->entity); @@ -82,11 +84,31 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit clearstatcache(); - // PDF + // Misc options + print_fiche_titre($langs->trans("DictionnaryPaperFormat"),'','').'
'; + $var=true; + print ''; + print ''; + + $selected=$conf->global->MAIN_PDF_FORMAT; + if (empty($selected)) $selected=dol_getDefaultFormat(); + + // Show pdf format + $var=!$var; + print ''; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DictionnaryPaperFormat").''; + print $formadmin->select_paper_format($selected,'MAIN_PDF_FORMAT'); + print '
'; + + print '
'; + + + // Addresses print_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; $var=true; print ''; - print ''; + print ''; // Show prof id 1 in address into pdf $var=!$var; @@ -126,9 +148,25 @@ else // Show { $var=true; - print_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; + // Misc options + print_fiche_titre($langs->trans("DictionnaryPaperFormat"),'','').'
'; + $var=true; + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print ''; + + // Show pdf format + $var=!$var; + print ''; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DictionnaryPaperFormat").''; + print $conf->global->MAIN_PDF_FORMAT; + print '
'; + + print '
'; + + print_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; print ''; - print ''; + print ''; // Show prof id 1 in address into pdf $var=!$var; @@ -166,5 +204,5 @@ else // Show $db->close(); -llxFooter('$Date: 2011/08/10 23:48:09 $ - $Revision: 1.1 $'); +llxFooter('$Date: 2011/08/11 01:34:54 $ - $Revision: 1.2 $'); ?> diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 23baf771908..96082b386a3 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -21,7 +21,7 @@ * \file htdocs/core/class/html.formadmin.class.php * \ingroup core * \brief File of class for html functions for admin pages - * \version $Id: html.formadmin.class.php,v 1.23 2011/07/31 23:45:14 eldy Exp $ + * \version $Id: html.formadmin.class.php,v 1.24 2011/08/11 01:34:54 eldy Exp $ */ @@ -77,7 +77,7 @@ class FormAdmin $out=''; - $out.= ''; if ($showempty) { $out.= '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'