Clean user card
This commit is contained in:
parent
76aef85ee4
commit
2bb55200f7
@ -110,6 +110,6 @@ UserLogged=User logged
|
|||||||
DateEmployment=Employment Start Date
|
DateEmployment=Employment Start Date
|
||||||
DateEmploymentEnd=Employment End Date
|
DateEmploymentEnd=Employment End Date
|
||||||
CantDisableYourself=You can't disable your own user record
|
CantDisableYourself=You can't disable your own user record
|
||||||
UserExpenseValidator=Expense report validator
|
ForceUserExpenseValidator=Force expense report validator
|
||||||
UserHolidayValidator=Leave request validator
|
ForceUserHolidayValidator=Force leave request validator
|
||||||
ValidatorIsSupervisorByDefault=By default, the supervisor is the validator for expense reports and leave requests
|
ValidatorIsSupervisorByDefault=By default, the supervisor is the validator for expense reports and leave requests
|
||||||
|
|||||||
@ -834,7 +834,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
.minheight20 { min-height: 20px; }
|
.minheight20 { min-height: 20px; }
|
||||||
.minheight40 { min-height: 40px; }
|
.minheight40 { min-height: 40px; }
|
||||||
.titlefieldcreate { width: 20%; }
|
.titlefieldcreate { width: 20%; }
|
||||||
.titlefield { width: 25%; }
|
.titlefield { /* width: 25%; */ width: 250px; }
|
||||||
.titlefieldmiddle { width: 50%; }
|
.titlefieldmiddle { width: 50%; }
|
||||||
.imgmaxwidth180 { max-width: 180px; }
|
.imgmaxwidth180 { max-width: 180px; }
|
||||||
.imgmaxheight50 { max-height: 50px; }
|
.imgmaxheight50 { max-height: 50px; }
|
||||||
@ -852,7 +852,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
/* Force values for small screen 1400 */
|
/* Force values for small screen 1400 */
|
||||||
@media only screen and (max-width: 1400px)
|
@media only screen and (max-width: 1400px)
|
||||||
{
|
{
|
||||||
.titlefield { width: 30% !important; }
|
.titlefield { /* width: 30% !important; */ }
|
||||||
.titlefieldcreate { width: 30% !important; }
|
.titlefieldcreate { width: 30% !important; }
|
||||||
.minwidth50imp { min-width: 50px !important; }
|
.minwidth50imp { min-width: 50px !important; }
|
||||||
.minwidth75imp { min-width: 75px !important; }
|
.minwidth75imp { min-width: 75px !important; }
|
||||||
|
|||||||
@ -1003,7 +1003,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
.minheight20 { min-height: 20px; }
|
.minheight20 { min-height: 20px; }
|
||||||
.minheight40 { min-height: 40px; }
|
.minheight40 { min-height: 40px; }
|
||||||
.titlefieldcreate { width: 20%; }
|
.titlefieldcreate { width: 20%; }
|
||||||
.titlefield { width: 25%; }
|
.titlefield { /* width: 25%; */ width: 250px; }
|
||||||
.titlefieldmiddle { width: 50%; }
|
.titlefieldmiddle { width: 50%; }
|
||||||
.imgmaxwidth180 { max-width: 180px; }
|
.imgmaxwidth180 { max-width: 180px; }
|
||||||
|
|
||||||
@ -1011,7 +1011,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
/* Force values for small screen 1400 */
|
/* Force values for small screen 1400 */
|
||||||
@media only screen and (max-width: 1400px)
|
@media only screen and (max-width: 1400px)
|
||||||
{
|
{
|
||||||
.titlefield { width: 30% !important; }
|
.titlefield { /* width: 30% !important; */ }
|
||||||
.titlefieldcreate { width: 30% !important; }
|
.titlefieldcreate { width: 30% !important; }
|
||||||
.minwidth50imp { min-width: 50px !important; }
|
.minwidth50imp { min-width: 50px !important; }
|
||||||
.minwidth75imp { min-width: 75px !important; }
|
.minwidth75imp { min-width: 75px !important; }
|
||||||
|
|||||||
@ -973,7 +973,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
if(!empty($conf->expensereport->enabled))
|
if(!empty($conf->expensereport->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td class="titlefieldcreate">';
|
print '<tr><td class="titlefieldcreate">';
|
||||||
$text = $langs->trans("UserExpenseValidator");
|
$text = $langs->trans("ForceUserExpenseValidator");
|
||||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -986,7 +986,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
if(!empty($conf->holiday->enabled))
|
if(!empty($conf->holiday->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td class="titlefieldcreate">';
|
print '<tr><td class="titlefieldcreate">';
|
||||||
$text = $langs->trans("UserHolidayValidator");
|
$text = $langs->trans("ForceUserHolidayValidator");
|
||||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -1231,20 +1231,20 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
|
|
||||||
// TODO Move this into tab RH (HierarchicalResponsible must be on both tab)
|
// TODO Move this into tab RH (HierarchicalResponsible must be on both tab)
|
||||||
|
|
||||||
// Position/Job
|
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("PostOrFunction").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print '<input class="maxwidth200" type="text" name="job" value="'.GETPOST('job', 'nohtml').'">';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Default warehouse
|
// 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 '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
||||||
print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1);
|
print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Position/Job
|
||||||
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("PostOrFunction").'</td>';
|
||||||
|
print '<td>';
|
||||||
|
print '<input class="maxwidth200" type="text" name="job" value="'.GETPOST('job', 'nohtml').'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||||
|| (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read)))
|
|| (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read)))
|
||||||
{
|
{
|
||||||
@ -1594,12 +1594,11 @@ else
|
|||||||
|
|
||||||
// Expense report validator
|
// Expense report validator
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$text = $langs->trans("UserExpenseValidator");
|
$text = $langs->trans("ForceUserExpenseValidator");
|
||||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (empty($object->fk_user_expense_validator)) print $langs->trans("None");
|
if (! empty($object->fk_user_expense_validator)) {
|
||||||
else {
|
|
||||||
$evuser=new User($db);
|
$evuser=new User($db);
|
||||||
$evuser->fetch($object->fk_user_expense_validator);
|
$evuser->fetch($object->fk_user_expense_validator);
|
||||||
print $evuser->getNomUrl(1);
|
print $evuser->getNomUrl(1);
|
||||||
@ -1609,12 +1608,11 @@ else
|
|||||||
|
|
||||||
// Holiday request validator
|
// Holiday request validator
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$text = $langs->trans("UserHolidayValidator");
|
$text = $langs->trans("ForceUserHolidayValidator");
|
||||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (empty($object->fk_user_holiday_validator)) print $langs->trans("None");
|
if (! empty($object->fk_user_holiday_validator)) {
|
||||||
else {
|
|
||||||
$hvuser=new User($db);
|
$hvuser=new User($db);
|
||||||
$hvuser->fetch($object->fk_user_holiday_validator);
|
$hvuser->fetch($object->fk_user_holiday_validator);
|
||||||
print $hvuser->getNomUrl(1);
|
print $hvuser->getNomUrl(1);
|
||||||
@ -1622,13 +1620,8 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Position/Job
|
|
||||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
|
|
||||||
print '<td>'.$object->job.'</td>';
|
|
||||||
print '</tr>'."\n";
|
|
||||||
|
|
||||||
// Default warehouse
|
// 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';
|
require_once DOL_DOCUMENT_ROOT .'/product/stock/class/entrepot.class.php';
|
||||||
$warehousestatic=new Entrepot($db);
|
$warehousestatic=new Entrepot($db);
|
||||||
@ -1638,6 +1631,11 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Position/Job
|
||||||
|
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
|
||||||
|
print '<td>'.$object->job.'</td>';
|
||||||
|
print '</tr>'."\n";
|
||||||
|
|
||||||
//$childids = $user->getAllChildIds(1);
|
//$childids = $user->getAllChildIds(1);
|
||||||
|
|
||||||
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||||
@ -2305,7 +2303,7 @@ else
|
|||||||
|
|
||||||
// Expense report validator
|
// Expense report validator
|
||||||
print '<tr><td class="titlefield">';
|
print '<tr><td class="titlefield">';
|
||||||
$text = $langs->trans("UserExpenseValidator");
|
$text = $langs->trans("ForceUserExpenseValidator");
|
||||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2325,7 +2323,7 @@ else
|
|||||||
|
|
||||||
// Holiday request validator
|
// Holiday request validator
|
||||||
print '<tr><td class="titlefield">';
|
print '<tr><td class="titlefield">';
|
||||||
$text = $langs->trans("UserHolidayValidator");
|
$text = $langs->trans("ForceUserHolidayValidator");
|
||||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2689,6 +2687,15 @@ else
|
|||||||
|
|
||||||
// TODO Move this into tab RH (HierarchicalResponsible must be on both tab)
|
// TODO Move this into tab RH (HierarchicalResponsible must be on both tab)
|
||||||
|
|
||||||
|
// Default warehouse
|
||||||
|
if (! empty($conf->stock->enabled) && ! empty($conf->global->USER_DEFAULT_WAREHOUSE)) // TODO What is goal of this. How it is used ?
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
||||||
|
print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1);
|
||||||
|
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit').'">'.$langs->trans("AddWarehouse").'</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Position/Job
|
// Position/Job
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("PostOrFunction").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("PostOrFunction").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2703,15 +2710,6 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Default warehouse
|
|
||||||
if (! empty($conf->stock->enabled))
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
|
||||||
print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1);
|
|
||||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit').'">'.$langs->trans("AddWarehouse").'</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||||
|| (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read)))
|
|| (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read)))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user