New add personal email and phone on user card
This commit is contained in:
parent
4c4c4f8bd6
commit
6e96cbc98d
@ -113,3 +113,5 @@ CantDisableYourself=You can't disable your own user record
|
||||
ForceUserExpenseValidator=Force expense report validator
|
||||
ForceUserHolidayValidator=Force leave request validator
|
||||
ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour.
|
||||
UserPersonalEmail=Personal email
|
||||
UserPersonalMobile=Personal mobile phone
|
||||
|
||||
@ -145,6 +145,22 @@ if ($action == 'update' && !$cancel)
|
||||
}
|
||||
}
|
||||
|
||||
// update personal email
|
||||
if ($action == 'setpersonal_email')
|
||||
{
|
||||
$object->personal_email = GETPOST('personal_email');
|
||||
$result = $object->update($user);
|
||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// update personal mobile
|
||||
if ($action == 'setpersonal_mobile')
|
||||
{
|
||||
$object->personal_mobile = GETPOST('personal_mobile');
|
||||
$result = $object->update($user);
|
||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -197,6 +213,22 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
|
||||
print '<td>'.$object->login.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("UserPersonalEmail", 'personal_email', $object->personal_email, $object, $user->rights->user->user->creer);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("UserPersonalEmail", 'personal_email', $object->personal_email, $object, $user->rights->user->user->creer, 'email', ($object->personal_email != '' ? dol_print_email($object->personal_email) : ''));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("UserPersonalMobile", 'personal_mobile', $object->personal_mobile, $object, $user->rights->user->user->creer);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("UserPersonalMobile", 'personal_mobile', $object->personal_mobile, $object, $user->rights->user->user->creer, 'string', ($object->personal_mobile != '' ? dol_print_phone($object->personal_mobile) : ''));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user