Skip to content

Commit

Permalink
Fix help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 3, 2023
1 parent b6b1d8a commit 55d93b3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions htdocs/core/class/notify.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ public function confirmMessage($action, $socid, $object)
$nb = count($listofnotiftodo);
}
if ($nb < 0) {
$texte = img_object($langs->trans("Notifications"), 'email').' '.$langs->trans("ErrorFailedToGetListOfNotificationsToSend");
$texte = img_object($langs->trans("Notifications"), 'email', 'class="pictofixedwidth"').$langs->trans("ErrorFailedToGetListOfNotificationsToSend");
} elseif ($nb == 0) {
$texte = img_object($langs->trans("Notifications"), 'email').' '.$langs->trans("NoNotificationsWillBeSent");
$texte = img_object($langs->trans("Notifications"), 'email', 'class="pictofixedwidth"').$langs->trans("NoNotificationsWillBeSent");
} elseif ($nb == 1) {
$texte = img_object($langs->trans("Notifications"), 'email').' '.$langs->trans("ANotificationsWillBeSent");
$texte = img_object($langs->trans("Notifications"), 'email', 'class="pictofixedwidth"').$langs->trans("ANotificationsWillBeSent");
} elseif ($nb >= 2) {
$texte = img_object($langs->trans("Notifications"), 'email').' '.$langs->trans("SomeNotificationsWillBeSent", $nb);
$texte = img_object($langs->trans("Notifications"), 'email', 'class="pictofixedwidth"').$langs->trans("SomeNotificationsWillBeSent", $nb);
}

if (is_array($listofnotiftodo)) {
Expand Down
4 changes: 2 additions & 2 deletions htdocs/expedition/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1755,9 +1755,9 @@

$text = $langs->trans("ConfirmValidateSending", $numref);
if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
$text .= '<br>'.$langs->trans("StockMovementWillBeRecorded").'.';
$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.';
} elseif (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) {
$text .= '<br>'.$langs->trans("StockMovementNotYetRecorded").'.';
$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.';
}

if (isModEnabled('notification')) {
Expand Down
7 changes: 6 additions & 1 deletion htdocs/reception/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,11 @@
}

$text = $langs->trans("ConfirmValidateReception", $numref);
if (getDolGlobalString('STOCK_CALCULATE_ON_RECEPTION')) {
$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.';
} elseif (getDolGlobalString('STOCK_CALCULATE_ON_RECEPTION_CLOSE')) {
$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.';
}

if (isModEnabled('notification')) {
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
Expand All @@ -1380,7 +1385,7 @@
$text .= $notify->confirmMessage('RECEPTION_VALIDATE', $object->socid, $object);
}

$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('ValidateReception'), $text, 'confirm_valid', '', 0, 1);
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('ValidateReception'), $text, 'confirm_valid', '', 0, 1, 250);
}

// Confirm cancelation
Expand Down

0 comments on commit 55d93b3

Please sign in to comment.