Skip to content

Commit 92f7ef7

Browse files
Evarisk#2058 [Control] add: text to see next control on locking screen
1 parent 100c411 commit 92f7ef7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

langs/fr_FR/digiquali.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ DraftValidatedLocked = -- (Brouillon + validé + verro
377377
CloneControlEquipments = Cloner les moyens de contrôle
378378
NoControl = Aucun contrôle
379379
NoPeriodicityControl = Aucune périodicité de contrôle
380+
LockControlDate = Le verrouillage de ce contrôle en date du %s entrainera une date de prochain contrôle pour le %s soit dans %d jours.
380381

381382

382383

view/control/control_card.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,15 @@
546546
}
547547

548548
// Lock confirmation
549+
$nextControlExist = 0;
550+
$days = 0;
551+
if (strlen($object->next_control_date > 0)) {
552+
$nextControlExist = 1;
553+
$days = abs($object->next_control_date - $object->control_date);
554+
$days = floor($days / (60 * 60 * 24));
555+
}
549556
if (($action == 'lock' && (empty($conf->use_javascript_ajax) || !empty($conf->dol_use_jmobile))) || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) {
550-
$formConfirm .= $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('LockObject', $langs->transnoentities('The' . ucfirst($object->element))), $langs->trans('ConfirmLockObject', $langs->transnoentities('The' . ucfirst($object->element))) . ($object->verdict == 2 ? '<br>' . $langs->transnoentities('BeCarefullVerdictKO') : ''), 'confirm_lock', '', 'yes', 'actionButtonLock', 350, 600);
557+
$formConfirm .= $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('LockObject', $langs->transnoentities('The' . ucfirst($object->element))), $langs->trans('ConfirmLockObject', $langs->transnoentities('The' . ucfirst($object->element))) . ($object->verdict == 2 ? '<br>' . $langs->transnoentities('BeCarefullVerdictKO') : '' . '<br><br>' . $langs->transnoentities('LockControlDate', dol_print_date($object->control_date), $nextControlExist == 1 ? dol_print_date($object->next_control_date) : $langs->transnoentities('NA'), $days)), 'confirm_lock', '', 'yes', 'actionButtonLock', 350, 600);
551558
}
552559

553560
// Clone confirmation

0 commit comments

Comments
 (0)