Merge pull request #24682 from frederic34/patch-2

add pictos
This commit is contained in:
Laurent Destailleur 2023-05-05 01:17:03 +02:00 committed by GitHub
commit 24413420ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de>
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
*
@ -1015,10 +1015,10 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
print '<td class="titlefield fieldrequired tdtop">'.$langs->trans("User").'</td>';
print '<td><div class="inline-block">';
if ($cancreate && !$cancreateall) {
print img_picto('', 'user').$form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'minwidth200 maxwidth500 inline-block');
print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'minwidth200 maxwidth500 inline-block');
//print '<input type="hidden" name="fuserid" value="'.($fuserid?$fuserid:$user->id).'">';
} else {
print img_picto('', 'user').$form->select_dolusers($fuserid ? $fuserid : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'minwidth200 maxwidth500 inline-block');
print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($fuserid ? $fuserid : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'minwidth200 maxwidth500 inline-block');
}
print '</div>';
@ -1089,7 +1089,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
print '<td class="fieldrequired">';
print $form->textwithpicto($langs->trans("DateDebCP"), $langs->trans("FirstDayOfHoliday"));
print '</td>';
print '<td>';
print '<td>'.img_picto('', 'action', 'class="pictofixedwidth"');;
// Si la demande ne vient pas de l'agenda
if (!GETPOST('date_debut_')) {
print $form->selectDate(-1, 'date_debut_', 0, 0, 0, '', 1, 1);
@ -1107,7 +1107,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
print '<td class="fieldrequired">';
print $form->textwithpicto($langs->trans("DateFinCP"), $langs->trans("LastDayOfHoliday"));
print '</td>';
print '<td>';
print '<td>'.img_picto('', 'action', 'class="pictofixedwidth"');
if (!GETPOST('date_fin_')) {
print $form->selectDate(-1, 'date_fin_', 0, 0, 0, '', 1, 1);
} else {
@ -1139,7 +1139,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
$defaultselectuser = GETPOST('valideur', 'int');
}
$s = $form->select_dolusers($defaultselectuser, "valideur", 1, '', 0, $include_users, '', '0,'.$conf->entity, 0, 0, '', 0, '', 'minwidth200 maxwidth500');
print img_picto('', 'user').$form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate"));
print img_picto('', 'user', 'class="pictofixedwidth"').$form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate"));
}
//print $form->select_dolusers((GETPOST('valideur','int')>0?GETPOST('valideur','int'):$user->fk_user), "valideur", 1, ($user->admin ? '' : array($user->id)), 0, '', 0, 0, 0, 0, '', 0, '', '', 1); // By default, hierarchical parent