From 61e91656e0073a31296c2961692d9cae06d09f76 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Feb 2022 14:14:34 +0100 Subject: [PATCH] FIX setup of member module FIX generation of business cards --- htdocs/adherents/admin/member.php | 9 +++++++++ htdocs/core/class/commonobject.class.php | 3 +-- htdocs/core/lib/admin.lib.php | 5 +++-- htdocs/core/modules/member/doc/pdf_standard.class.php | 6 +++--- htdocs/langs/en_US/admin.lang | 3 ++- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index 2b6a0838fe1..d51dd8ef730 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -429,6 +429,14 @@ print ''; print ''; + +/* +TODO Use a global form instead of embeded form into table +print '
'; +print ''; +print ''; +*/ + /* * Edit info of model document */ @@ -467,6 +475,7 @@ $helptext .= '__YEAR__, __MONTH__, __DAY__'; form_constantes($constantes, 0, $helptext); +//print '
'; print "
"; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8ab59689976..8dabc902e5c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5292,8 +5292,7 @@ abstract class CommonObject $sav_charset_output = $outputlangs->charset_output; if (in_array(get_class($this), array('Adherent'))) { - $arrayofrecords = array(); // The write_file of templates of adherent class need this var - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, 'tmp_cards', $moreparams); } else { $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 448677002df..a068f5fb5f5 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1627,6 +1627,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Valu if (empty($strictw3c)) { print "\n".'
'; print ''; + print ''; } print ''; @@ -1733,7 +1734,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Valu // Submit if (empty($strictw3c)) { print ''; - print ''; + print ''; print ""; } @@ -1748,7 +1749,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Valu print ''; if (!empty($strictw3c) && $strictw3c == 1) { - print '
'; + print '
'; print "
\n"; } } diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index d39afdd9420..0fc13cbe134 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -50,14 +50,14 @@ class pdf_standard extends CommonStickerGenerator global $conf, $langs, $mysoc; // Translations - $langs->loadLangs(array("main", "bills")); + $langs->loadLangs(array("main", "admin")); $this->db = $db; $this->name = "standard"; - $this->description = $langs->trans('PDFStandard'); + $this->description = $langs->trans('TemplateforBusinessCards'); //$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template - $this->type = 'html'; + $this->type = 'pdf-various-sizes'; } /** diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 3506f024eea..5af3fe19592 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2218,4 +2218,5 @@ API_DISABLE_COMPRESSION=Disable compression of API responses EachTerminalHasItsOwnCounter=Each terminal use its own counter. FillAndSaveAccountIdAndSecret=Fill and save account ID and secret first PreviousHash=Previous hash -LateWarningAfter="Late" warning after \ No newline at end of file +LateWarningAfter="Late" warning after +TemplateforBusinessCards=Template for a business card in different size \ No newline at end of file