Update card.php

When you edit a user (with read others and change password others), the form allows the civility_code to be changed but the changes are not saved. I will propose a change in the user card to avoid this
This commit is contained in:
javieralapps4up 2021-10-22 02:53:37 +02:00 committed by GitHub
parent f50dfe8571
commit 0020a5c61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2036,7 +2036,11 @@ if ($action == 'create' || $action == 'adduserldap') {
// Civility
print '<tr><td class="titlefieldcreate"><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code');
if ($caneditfield && !$object->ldap_sid) {
print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code');
} elseif ($object->civility_code) {
print $langs->trans("Civility".$object->civility_code);
}
print '</td></tr>';
// Lastname