Fix label of field
This commit is contained in:
parent
ca2ce88bd2
commit
f21fc43e7e
@ -360,10 +360,11 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
|
||||
// HRM
|
||||
$tmpentry = array(
|
||||
'enabled'=>(!empty($conf->hrm->enabled) || !empty($conf->holiday->enabled) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)),
|
||||
'enabled'=>(!empty($conf->hrm->enabled) || (!empty($conf->holiday->enabled)) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)),
|
||||
'perms'=>(!empty($user->rights->hrm->employee->read) || !empty($user->rights->holiday->write) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)),
|
||||
'module'=>'hrm|holiday|deplacement|expensereport|recruitment'
|
||||
);
|
||||
|
||||
$menu_arr[] = array(
|
||||
'name' => 'HRM',
|
||||
'link' => '/hrm/index.php?mainmenu=hrm&leftmenu=',
|
||||
|
||||
@ -930,12 +930,6 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td>';
|
||||
print '<td>';
|
||||
print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2);
|
||||
print '</td></tr>';
|
||||
|
||||
// Gender
|
||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||
print '<td>';
|
||||
@ -983,6 +977,11 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// External user
|
||||
print '<tr><td>'.$langs->trans("ExternalUser").' ?</td>';
|
||||
print '<td>';
|
||||
print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table><hr><table class="border centpercent">';
|
||||
|
||||
@ -2196,36 +2195,6 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td>';
|
||||
print '<td>';
|
||||
if ($user->id == $object->id || !$user->admin)
|
||||
{
|
||||
// Read mode
|
||||
$type = $langs->trans("Internal");
|
||||
if ($object->socid) $type = $langs->trans("External");
|
||||
print $form->textwithpicto($type, $langs->trans("InternalExternalDesc"));
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
} else {
|
||||
// Select mode
|
||||
$type = 0;
|
||||
if ($object->contact_id) $type = $object->contact_id;
|
||||
|
||||
if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact
|
||||
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' ');
|
||||
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1);
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
|
||||
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
||||
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1);
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
} else { // $object->socid is not > 0 here
|
||||
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
||||
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1);
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Gender
|
||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||
print '<td>';
|
||||
@ -2306,6 +2275,35 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// External user ?
|
||||
print '<tr><td>'.$langs->trans("ExternalUser").' ?</td>';
|
||||
print '<td>';
|
||||
if ($user->id == $object->id || !$user->admin)
|
||||
{
|
||||
// Read mode
|
||||
$type = $langs->trans("Internal");
|
||||
if ($object->socid) $type = $langs->trans("External");
|
||||
print $form->textwithpicto($type, $langs->trans("InternalExternalDesc"));
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
} else {
|
||||
// Select mode
|
||||
$type = 0;
|
||||
if ($object->contact_id) $type = $object->contact_id;
|
||||
|
||||
if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact
|
||||
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' ');
|
||||
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1);
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
|
||||
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
||||
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1);
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
} else { // $object->socid is not > 0 here
|
||||
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
||||
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1);
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table><hr><table class="border centpercent">';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user