Fix bad tooltip when option SERVICE_STRICT_MANDATORY_PERIOD is on

This commit is contained in:
Laurent Destailleur 2024-07-22 11:44:00 +02:00
parent ff46f57ea5
commit e0d6d2d7c7
2 changed files with 11 additions and 1 deletions

View File

@ -404,7 +404,8 @@ PMPValueShort=WAP
mandatoryperiod=Mandatory periods
mandatoryPeriodNeedTobeSet=Note: Period (start and end date) must be defined
mandatoryPeriodNeedTobeSetMsgValidate=A service requires a start and end period
mandatoryHelper=Check this if you want a message to the user when creating / validating an invoice, commercial proposal, sales order without entering a start and end date on lines with this service.<br>Note that the message is a warning and not a blocking error.
mandatoryHelper=Check this if you want a message to the user when creating / validating an invoice, commercial proposal, sales order without entering a start and end date on lines with this service.
mandatoryHelper2=Note that the message is a warning and not a blocking error.
DefaultBOM=Default BOM
DefaultBOMDesc=The default BOM recommended to use to manufacture this product. This field can be set only if nature of product is '%s'.
Rank=Rank

View File

@ -1560,6 +1560,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print '<input type="checkbox" id="mandatoryperiod" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').'>';
print '<label for="mandatoryperiod">';
$htmltooltip = $langs->trans("mandatoryHelper");
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
}
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
print '</label>';
@ -2179,6 +2182,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print '<input type="checkbox" id="mandatoryperiod" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').'>';
print '<label for="mandatoryperiod">';
$htmltooltip = $langs->trans("mandatoryHelper");
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
}
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
print '</label>';
@ -2703,6 +2709,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print ' &nbsp; &nbsp; &nbsp; ';
}
$htmltooltip = $langs->trans("mandatoryHelper");
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
}
print '<input type="checkbox" class="" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').' disabled>';
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);