print $form->formconfirm("fiche.php?id=" . $id, $langs->trans("TitleToValidCP"), $langs->trans("ConfirmToValidCP"), "confirm_send", '', 1, 1); } // Si validation de la demande if ($action == 'valid') { print $form->formconfirm("fiche.php?id=" . $id, $langs->trans("TitleValidCP"), $langs->trans("ConfirmValidCP"), "confirm_valid", '', 1, 1); } // Si refus de la demande if ($action == 'refuse') { $array_input = array(array('type' => "text", 'label' => $langs->trans('DetailRefusCP'), 'name' => "detail_refuse", 'size' => "50", 'value' => "")); print $form->formconfirm("fiche.php?id=" . $id . "&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); } // Si annulation de la demande if ($action == 'cancel') { print $form->formconfirm("fiche.php?id=" . $id, $langs->trans("TitleCancelCP"), $langs->trans("ConfirmCancelCP"), "confirm_cancel", '', 1, 1); } $head = holiday_prepare_head($cp); dol_fiche_head($head, 'card', $langs->trans("CPTitreMenu"), 0, 'holiday'); if ($action == 'edit' && $cp->statut == 1) { $edit = true; print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $_GET['id'] . '">' . "\n"; print '<input type="hidden" name="action" value="update"/>' . "\n"; print '<input type="hidden" name="holiday_id" value="' . $_GET['id'] . '" />' . "\n"; } print '<table class="border" width="100%">'; print '<tbody>'; $linkback = ''; print '<tr>'; print '<td width="25%">' . $langs->trans("Ref") . '</td>'; print '<td>'; print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref'); print '</td>';
/* * Actions */ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php'; /* * View */ $form = new Form($db); $listhalfday = array('morning' => $langs->trans("Morning"), "afternoon" => $langs->trans("Afternoon")); llxHeader("", "", $langs->trans("InterventionCard")); if ($object->id) { $valideur = new User($db); $valideur->fetch($object->fk_validator); $userRequest = new User($db); $userRequest->fetch($object->fk_user); $head = holiday_prepare_head($object); dol_fiche_head($head, 'documents', $langs->trans("CPTitreMenu"), 0, 'holiday'); // Construit liste des fichiers $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\\.meta|_preview\\.png)$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $totalsize = 0; foreach ($filearray as $key => $file) { $totalsize += $file['size']; } print '<table class="border" width="100%">'; $linkback = ''; print '<tr>'; print '<td width="25%">' . $langs->trans("Ref") . '</td>'; print '<td>'; print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref'); print '</td>'; print '</tr>';