From e7306625f0425648f7ee5aca0815f0c8fa6e9dbb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Dec 2020 15:28:12 +0100 Subject: [PATCH] Fix look and feel v13 --- htdocs/admin/dict.php | 2 +- htdocs/holiday/card.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 3048625cd5f..d06f8a2ce31 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -682,7 +682,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) { // Discard check of mandatory fields for country for some tables if ($value == 'country_id' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryVAT', 'DictionaryRegion', 'DictionaryCompanyType', 'DictionaryHolidayTypes', 'DictionaryRevenueStamp', 'DictionaryAccountancysystem', 'DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory - if ($value == 'country' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryCanton', 'DictionaryCompanyType', 'DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory + if ($value == 'country' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryCanton', 'DictionaryCompanyType', 'DictionaryHolidayTypes', 'DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory // Discard check of mandatory fiedls for other fields if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 4adecb20235..e0685789799 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -999,10 +999,10 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { - print $form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); + print img_picto('', 'user').$form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth500'); //print ''; } else { - print $form->select_dolusers(GETPOST('fuserid', 'int') ? GETPOST('fuserid', 'int') : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); + print img_picto('', 'user').$form->select_dolusers(GETPOST('fuserid', 'int') ? GETPOST('fuserid', 'int') : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth500'); } print ''; print ''; @@ -1019,7 +1019,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')' : ''); $arraytypeleaves[$val['rowid']] = $labeltoshow; } - print $form->selectarray('type', $arraytypeleaves, (GETPOST('type', 'alpha') ?GETPOST('type', 'alpha') : ''), 1); + print $form->selectarray('type', $arraytypeleaves, (GETPOST('type', 'alpha') ?GETPOST('type', 'alpha') : ''), 1, 0, 0, '', 0, 0, 0, '', '', true); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; print ''; @@ -1048,7 +1048,6 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print $form->textwithpicto($langs->trans("DateFinCP"), $langs->trans("LastDayOfHoliday")); print ''; print ''; - // Si la demande ne vient pas de l'agenda if (!GETPOST('date_fin_')) { print $form->selectDate(-1, 'date_fin_', 0, 0, 0, '', 1, 1); } else { @@ -1067,13 +1066,14 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $object = new Holiday($db); $include_users = $object->fetch_users_approver_holiday(); - if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); - else { + if (empty($include_users)) { + print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); + } else { $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); // Will work only if supervisor has permission to approve so is inside include_users if (!empty($conf->global->HOLIDAY_DEFAULT_VALIDATOR)) $defaultselectuser = $conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver if (GETPOST('valideur', 'int') > 0) $defaultselectuser = GETPOST('valideur', 'int'); - $s = $form->select_dolusers($defaultselectuser, "valideur", 1, "", 0, $include_users); - print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); + $s = $form->select_dolusers($defaultselectuser, "valideur", 1, '', 0, $include_users, '', '0,'.$conf->entity, 0, 0, '', 0, '', 'maxwidth500'); + print img_picto('', 'user').$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