From fb68aef9692a8a7f2c8c2e13af7c6d5ef15404c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Sep 2023 22:13:04 +0200 Subject: [PATCH] NEW Can manage ODT documents for groups of users. --- .../doc/doc_generic_usergroup_odt.modules.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 7e91fa47419..7c1b4484fd0 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -109,7 +109,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $odtPath = trim(getDolGlobalString('USERGROUP_ADDON_PDF_ODT_PATH')); $texte = $this->description.".
\n"; - $texte .= '
'; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; @@ -184,7 +184,26 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $texte .= ""; $texte .= ''; } + $texte .= '
'; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
'; + } + $texte .= '
'; } + // Add input to upload a new template file. + $texte .= '
'.$langs->trans("UploadNewTemplate"); + $maxfilesizearray = getMaxFileSizeArray(); + $maxmin = $maxfilesizearray['maxmin']; + if ($maxmin > 0) { + $texte .= ''; // MAX_FILE_SIZE must precede the field type=file + } + $texte .= ' '; + $texte .= ''; + $texte .= ''; + $texte .= '
'; $texte .= '';