NEW Can add a tooltip after the combo list of doc templates

This commit is contained in:
Laurent Destailleur 2022-01-22 14:03:39 +01:00
parent 8c22de6982
commit 6baa0939ce

View File

@ -379,9 +379,10 @@ class FormFile
* @param Object $object Object when method is called from an object card. * @param Object $object Object when method is called from an object card.
* @param int $hideifempty Hide section of generated files if there is no file * @param int $hideifempty Hide section of generated files if there is no file
* @param string $removeaction (optional) The action to remove a file * @param string $removeaction (optional) The action to remove a file
* @param string $tooltipontemplatecombo Text to show on a tooltip after the combo list of templates
* @return string Output string with HTML array of documents (might be empty string) * @return string Output string with HTML array of documents (might be empty string)
*/ */
public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '', $morepicto = '', $object = null, $hideifempty = 0, $removeaction = 'remove_file') public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '', $morepicto = '', $object = null, $hideifempty = 0, $removeaction = 'remove_file', $tooltipontemplatecombo = '')
{ {
global $dolibarr_main_url_root; global $dolibarr_main_url_root;
@ -769,6 +770,7 @@ class FormFile
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
$out .= ajax_combobox('model'); $out .= ajax_combobox('model');
} }
$out .= $form->textwithpicto('', $tooltipontemplatecombo, 1, 'help', 'marginrightonly', 0, 3, '', 0);
} else { } else {
$out .= '<div class="float">'.$langs->trans("Files").'</div>'; $out .= '<div class="float">'.$langs->trans("Files").'</div>';
} }