From ccd965b87e735966dd4227dbaf1db0a9d3f4058c Mon Sep 17 00:00:00 2001 From: evarisk-kilyan Date: Fri, 13 Sep 2024 09:32:34 +0200 Subject: [PATCH 1/2] #645 [SessionCard] fix: use saturne for lock and archive --- view/session/session_card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/session/session_card.php b/view/session/session_card.php index 5df2552..c01fc25 100644 --- a/view/session/session_card.php +++ b/view/session/session_card.php @@ -171,7 +171,7 @@ require_once __DIR__ . '/../../../saturne/core/tpl/documents/saturne_manual_pdf_generation_action.tpl.php'; // Action confirm_lock, confirm_archive. - require_once __DIR__ . '/../../../saturne/core/tpl/signature/signature_action_workflow.tpl.php'; + require_once __DIR__ . '/../../../saturne/core/tpl/actions/object_workflow_actions.tpl.php'; // Actions to send emails. $triggersendname = strtoupper($object->element) . '_SENTBYMAIL'; @@ -654,7 +654,7 @@ // Archive. $displayButton = $onPhone ? '' : '' . ' ' . $langs->trans('Archive'); if ($object->status == $object::STATUS_LOCKED) { - print '' . $displayButton . ''; + print '' . $displayButton . ''; } else { print '' . $displayButton . ''; } From e83357623c48dbcd130a266551efa6f6825b964e Mon Sep 17 00:00:00 2001 From: evarisk-kilyan Date: Tue, 17 Sep 2024 10:02:59 +0200 Subject: [PATCH 2/2] #645 [SessionCard] add: confirm box on archive --- view/session/session_card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/view/session/session_card.php b/view/session/session_card.php index c01fc25..6f71ac7 100644 --- a/view/session/session_card.php +++ b/view/session/session_card.php @@ -437,6 +437,10 @@ if (($action == 'lock' && (empty($conf->use_javascript_ajax) || !empty($conf->dol_use_jmobile))) || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) { $formConfirm .= $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&object_type=' . $object->element, $langs->trans('LockObject', $langs->transnoentities('The' . ucfirst($object->element))), $langs->trans('ConfirmLockObject', $langs->transnoentities('The' . ucfirst($object->element))), 'confirm_lock', '', 'yes', 'actionButtonLock', 350, 600); } + // Archive confirmation + if (($action == 'set_archive' && (empty($conf->use_javascript_ajax) || !empty($conf->dol_use_jmobile))) || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) { + $formConfirm .= $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&object_type=' . $object->element . '&forcebuilddoc=true', $langs->trans('ArchiveObject', $langs->transnoentities('The' . ucfirst($object->element))), $langs->trans('ConfirmArchiveObject', $langs->transnoentities('The' . ucfirst($object->element))), 'confirm_archive', '', 'yes', 'actionButtonArchive', 350, 600); + } // Clone confirmation. if (($action == 'clone' && (empty($conf->use_javascript_ajax) || !empty($conf->dol_use_jmobile))) || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) { @@ -654,7 +658,7 @@ // Archive. $displayButton = $onPhone ? '' : '' . ' ' . $langs->trans('Archive'); if ($object->status == $object::STATUS_LOCKED) { - print '' . $displayButton . ''; + print '' . $displayButton . ''; } else { print '' . $displayButton . ''; }