diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index d8758ac9dc0..0aa4bc6c929 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -110,6 +110,6 @@ UserLogged=User logged DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record -UserExpenseValidator=Expense report validator -UserHolidayValidator=Leave request validator +ForceUserExpenseValidator=Force expense report validator +ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the supervisor is the validator for expense reports and leave requests diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 904f6a197d5..4b0ccd45fd5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -834,7 +834,7 @@ table[summary="list_of_modules"] .fa-cog { .minheight20 { min-height: 20px; } .minheight40 { min-height: 40px; } .titlefieldcreate { width: 20%; } -.titlefield { width: 25%; } +.titlefield { /* width: 25%; */ width: 250px; } .titlefieldmiddle { width: 50%; } .imgmaxwidth180 { max-width: 180px; } .imgmaxheight50 { max-height: 50px; } @@ -852,7 +852,7 @@ table[summary="list_of_modules"] .fa-cog { /* Force values for small screen 1400 */ @media only screen and (max-width: 1400px) { - .titlefield { width: 30% !important; } + .titlefield { /* width: 30% !important; */ } .titlefieldcreate { width: 30% !important; } .minwidth50imp { min-width: 50px !important; } .minwidth75imp { min-width: 75px !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dcbbbd1cf4f..a17a33bd898 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1003,7 +1003,7 @@ table[summary="list_of_modules"] .fa-cog { .minheight20 { min-height: 20px; } .minheight40 { min-height: 40px; } .titlefieldcreate { width: 20%; } -.titlefield { width: 25%; } +.titlefield { /* width: 25%; */ width: 250px; } .titlefieldmiddle { width: 50%; } .imgmaxwidth180 { max-width: 180px; } @@ -1011,7 +1011,7 @@ table[summary="list_of_modules"] .fa-cog { /* Force values for small screen 1400 */ @media only screen and (max-width: 1400px) { - .titlefield { width: 30% !important; } + .titlefield { /* width: 30% !important; */ } .titlefieldcreate { width: 30% !important; } .minwidth50imp { min-width: 50px !important; } .minwidth75imp { min-width: 75px !important; } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 3deb0cf870c..bdef850fa6b 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -973,7 +973,7 @@ if ($action == 'create' || $action == 'adduserldap') if(!empty($conf->expensereport->enabled)) { print ''; - $text = $langs->trans("UserExpenseValidator"); + $text = $langs->trans("ForceUserExpenseValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print ''; print ''; @@ -986,7 +986,7 @@ if ($action == 'create' || $action == 'adduserldap') if(!empty($conf->holiday->enabled)) { print ''; - $text = $langs->trans("UserHolidayValidator"); + $text = $langs->trans("ForceUserHolidayValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print ''; print ''; @@ -1231,20 +1231,20 @@ if ($action == 'create' || $action == 'adduserldap') // TODO Move this into tab RH (HierarchicalResponsible must be on both tab) - // Position/Job - print ''.$langs->trans("PostOrFunction").''; - print ''; - print ''; - print ''; - // Default warehouse - if (! empty($conf->stock->enabled)) + if (! empty($conf->stock->enabled) && ! empty($conf->global->USER_DEFAULT_WAREHOUSE)) // TODO What is goal of this. How it is used ? { print ''.$langs->trans("DefaultWarehouse").''; print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1); print ''; } + // Position/Job + print ''.$langs->trans("PostOrFunction").''; + print ''; + print ''; + print ''; + if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read))) { @@ -1594,12 +1594,11 @@ else // Expense report validator print ''; - $text = $langs->trans("UserExpenseValidator"); + $text = $langs->trans("ForceUserExpenseValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print ''; print ''; - if (empty($object->fk_user_expense_validator)) print $langs->trans("None"); - else { + if (! empty($object->fk_user_expense_validator)) { $evuser=new User($db); $evuser->fetch($object->fk_user_expense_validator); print $evuser->getNomUrl(1); @@ -1609,12 +1608,11 @@ else // Holiday request validator print ''; - $text = $langs->trans("UserHolidayValidator"); + $text = $langs->trans("ForceUserHolidayValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print ''; print ''; - if (empty($object->fk_user_holiday_validator)) print $langs->trans("None"); - else { + if (! empty($object->fk_user_holiday_validator)) { $hvuser=new User($db); $hvuser->fetch($object->fk_user_holiday_validator); print $hvuser->getNomUrl(1); @@ -1622,13 +1620,8 @@ else print ''; print "\n"; - // Position/Job - print ''.$langs->trans("PostOrFunction").''; - print ''.$object->job.''; - print ''."\n"; - // Default warehouse - if (! empty($conf->stock->enabled)) + if (! empty($conf->stock->enabled) && ! empty($conf->global->USER_DEFAULT_WAREHOUSE)) // TODO What is goal of this. How it is used ? { require_once DOL_DOCUMENT_ROOT .'/product/stock/class/entrepot.class.php'; $warehousestatic=new Entrepot($db); @@ -1638,7 +1631,12 @@ else print ''; } - //$childids = $user->getAllChildIds(1); + // Position/Job + print ''.$langs->trans("PostOrFunction").''; + print ''.$object->job.''; + print ''."\n"; + + //$childids = $user->getAllChildIds(1); if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read))) @@ -2305,7 +2303,7 @@ else // Expense report validator print ''; - $text = $langs->trans("UserExpenseValidator"); + $text = $langs->trans("ForceUserExpenseValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print ''; print ''; @@ -2325,7 +2323,7 @@ else // Holiday request validator print ''; - $text = $langs->trans("UserHolidayValidator"); + $text = $langs->trans("ForceUserHolidayValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print ''; print ''; @@ -2689,22 +2687,8 @@ else // TODO Move this into tab RH (HierarchicalResponsible must be on both tab) - // Position/Job - print ''.$langs->trans("PostOrFunction").''; - print ''; - if ($caneditfield) - { - print ''; - } - else - { - print ''; - print $object->job; - } - print ''; - // Default warehouse - if (! empty($conf->stock->enabled)) + if (! empty($conf->stock->enabled) && ! empty($conf->global->USER_DEFAULT_WAREHOUSE)) // TODO What is goal of this. How it is used ? { print ''.$langs->trans("DefaultWarehouse").''; print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1); @@ -2712,7 +2696,21 @@ else print ''; } - if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) + // Position/Job + print ''.$langs->trans("PostOrFunction").''; + print ''; + if ($caneditfield) + { + print ''; + } + else + { + print ''; + print $object->job; + } + print ''; + + if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read))) { $langs->load("salaries");