From 7e4c8ef622a39ab5017460bcb366913b206325c0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 25 Jan 2025 15:27:51 +0100 Subject: [PATCH 1/2] QUAL add help text for default values --- htdocs/admin/defaultvalues.php | 4 +++- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index df90a2a2d62..52f5f64c010 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -311,7 +311,9 @@ if ($mode != 'focus' && $mode != 'mandatory') { foreach ($substitutionarray as $key => $val) { $texthelp .= $key.' -> '.$val.'
'; } - $textvalue = $form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, 'subsitutiontooltip'); + $texthelp2 = $langs->trans("DefaultValuesHelpText"); + $text = $form->textwithpicto($langs->trans("Value"), $texthelp2); + $textvalue = $form->textwithpicto($text, $texthelp, 1, 'list-alt', 'valignmiddle', 0, 2, 'subsitutiontooltip'); } else { $texthelp = 'ASC or DESC'; $textvalue = $form->textwithpicto($langs->trans("SortOrder"), $texthelp); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d75fa1443c9..92515e51f66 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1723,6 +1723,7 @@ CompressionOfResources=Compression of HTTP responses CompressionOfResourcesDesc=For example using the Apache directive "AddOutputFilterByType DEFLATE" TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers DefaultValuesDesc=Here you may define the default value you wish to use when creating a new record, and/or default filters or the sort order when you list records. +DefaultValuesHelpText=You can use a single value or comma-separated values ​​for multiple choices. You can also use substitution tags (see list below). DefaultCreateForm=Default values (to use on forms) DefaultSearchFilters=Default search filters DefaultSortOrder=Default sort orders From 41058de4efba7300a2fb21ac4f874ea8007a1762 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 25 Jan 2025 15:48:21 +0100 Subject: [PATCH 2/2] FIX look and feel --- htdocs/admin/defaultvalues.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 52f5f64c010..7a1fafd861e 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -311,9 +311,7 @@ if ($mode != 'focus' && $mode != 'mandatory') { foreach ($substitutionarray as $key => $val) { $texthelp .= $key.' -> '.$val.'
'; } - $texthelp2 = $langs->trans("DefaultValuesHelpText"); - $text = $form->textwithpicto($langs->trans("Value"), $texthelp2); - $textvalue = $form->textwithpicto($text, $texthelp, 1, 'list-alt', 'valignmiddle', 0, 2, 'subsitutiontooltip'); + $textvalue = $form->textwithpicto($langs->trans("Value"), $langs->trans("DefaultValuesHelpText")); } else { $texthelp = 'ASC or DESC'; $textvalue = $form->textwithpicto($langs->trans("SortOrder"), $texthelp); @@ -347,6 +345,7 @@ print ''; if ($mode != 'focus' && $mode != 'mandatory') { print ''; print ''; + print $form->textwithpicto('', $texthelp, 1, 'list-alt', 'paddingleftimp cursorpointer', 0, 2, 'subsitutiontooltip'); print ''; } // Limit to superadmin