remove unused code
This commit is contained in:
parent
eaafa59160
commit
b7e539a90a
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -124,8 +124,6 @@ $title = $langs->trans("Leave").' - '.$langs->trans("Files");
|
|||||||
|
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
$edit = false;
|
|
||||||
|
|
||||||
if ($object->id) {
|
if ($object->id) {
|
||||||
$valideur = new User($db);
|
$valideur = new User($db);
|
||||||
$valideur->fetch($object->fk_validator);
|
$valideur->fetch($object->fk_validator);
|
||||||
@ -176,51 +174,25 @@ if ($object->id) {
|
|||||||
$starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning';
|
$starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning';
|
||||||
$endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon';
|
$endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon';
|
||||||
|
|
||||||
if (!$edit) {
|
print '<tr>';
|
||||||
print '<tr>';
|
print '<td>';
|
||||||
print '<td>';
|
print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday"));
|
||||||
print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday"));
|
print '</td>';
|
||||||
print '</td>';
|
print '<td>'.dol_print_date($object->date_debut, 'day');
|
||||||
print '<td>'.dol_print_date($object->date_debut, 'day');
|
print ' ';
|
||||||
print ' ';
|
print '<span class="opacitymedium">'.$langs->trans($listhalfday[$starthalfday]).'</span>';
|
||||||
print '<span class="opacitymedium">'.$langs->trans($listhalfday[$starthalfday]).'</span>';
|
print '</td>';
|
||||||
print '</td>';
|
print '</tr>';
|
||||||
print '</tr>';
|
|
||||||
} else {
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday"));
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->selectDate($object->date_debut, 'date_debut_');
|
|
||||||
print ' ';
|
|
||||||
print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday') ?GETPOST('starthalfday') : $starthalfday));
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$edit) {
|
print '<tr>';
|
||||||
print '<tr>';
|
print '<td>';
|
||||||
print '<td>';
|
print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday"));
|
||||||
print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday"));
|
print '</td>';
|
||||||
print '</td>';
|
print '<td>'.dol_print_date($object->date_fin, 'day');
|
||||||
print '<td>'.dol_print_date($object->date_fin, 'day');
|
print ' ';
|
||||||
print ' ';
|
print '<span class="opacitymedium">'.$langs->trans($listhalfday[$endhalfday]).'</span>';
|
||||||
print '<span class="opacitymedium">'.$langs->trans($listhalfday[$endhalfday]).'</span>';
|
print '</td>';
|
||||||
print '</td>';
|
print '</tr>';
|
||||||
print '</tr>';
|
|
||||||
} else {
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday"));
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->selectDate($object->date_fin, 'date_fin_');
|
|
||||||
print ' ';
|
|
||||||
print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday') ?GETPOST('endhalfday') : $endhalfday));
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nb days consumed
|
// Nb days consumed
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -247,17 +219,10 @@ if ($object->id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
if (!$edit) {
|
print '<tr>';
|
||||||
print '<tr>';
|
print '<td>'.$langs->trans('DescCP').'</td>';
|
||||||
print '<td>'.$langs->trans('DescCP').'</td>';
|
print '<td>'.nl2br($object->description).'</td>';
|
||||||
print '<td>'.nl2br($object->description).'</td>';
|
print '</tr>';
|
||||||
print '</tr>';
|
|
||||||
} else {
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans('DescCP').'</td>';
|
|
||||||
print '<td><textarea name="description" class="flat" rows="'.ROWS_3.'" cols="70">'.$object->description.'</textarea></td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||||
@ -274,8 +239,7 @@ if ($object->id) {
|
|||||||
print '<table class="border tableforfield centpercent">'."\n";
|
print '<table class="border tableforfield centpercent">'."\n";
|
||||||
print '<tbody>';
|
print '<tbody>';
|
||||||
|
|
||||||
if (! empty($object->fk_user_create))
|
if (! empty($object->fk_user_create)) {
|
||||||
{
|
|
||||||
$userCreate=new User($db);
|
$userCreate=new User($db);
|
||||||
$userCreate->fetch($object->fk_user_create);
|
$userCreate->fetch($object->fk_user_create);
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -284,19 +248,10 @@ if ($object->id) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$edit) {
|
print '<tr>';
|
||||||
print '<tr>';
|
print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>';
|
||||||
print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>';
|
print '<td>'.$valideur->getNomUrl(-1).'</td>';
|
||||||
print '<td>'.$valideur->getNomUrl(-1).'</td>';
|
print '</tr>';
|
||||||
print '</tr>';
|
|
||||||
} else {
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->select_dolusers($object->fk_user, "valideur", 1, ($user->admin ? '' : array($user->id))); // By default, hierarchical parent
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('DateCreation').'</td>';
|
print '<td>'.$langs->trans('DateCreation').'</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user