diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6677f7f8dce..48f46860717 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -312,9 +312,9 @@ class FormCompany extends Form $out .= ''; } else { if (!$country || $country != $obj->country) { - // Affiche la rupture si on est en mode liste multipays + // Show break if we are in list with multiple countries if (!$country_codeid && $obj->country_code) { - $out .= '\n"; + $out .= '\n"; $country = $obj->country; } } diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 4108724236d..8874b96eda5 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -454,8 +454,10 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = templateResult: function (data, container) { /* Format visible output into combo list */ /* Code to add class of origin OPTION propagated to the new select2
  • tag */ if (data.element) { $(container).addClass($(data.element).attr("class")); } - //console.log(data.html); - if (data.id == -1) return \' \'; + console.log($(data.element).attr("data-html")); + if (data.id == -1 && $(data.element).attr("data-html") == undefined) { + return \' \'; + } if ($(data.element).attr("data-html") != undefined) return htmlEntityDecodeJs($(data.element).attr("data-html")); // If property html set, we decode html entities and use this return data.text; }, diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index dc2a83f2015..8fea1ffd839 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -503,9 +503,11 @@ By=By From=From FromDate=From FromLocation=From -at=at to=to To=to +ToDate=to +ToLocation=to +at=at and=and or=or Other=Other diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index 727773a9606..d84257b69ad 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -12,6 +12,7 @@ PasswordChangedTo=Password changed to: %s SubjectNewPassword=Your new password for %s GroupRights=Group permissions UserRights=User permissions +Credentials=Credentials UserGUISetup=User Display Setup DisableUser=Disable DisableAUser=Disable a user @@ -115,7 +116,7 @@ DateOfEmployment=Employment date DateEmployment=Employment DateEmploymentstart=Employment Start Date DateEmploymentEnd=Employment End Date -RangeOfLoginValidity=Date range of login validity +RangeOfLoginValidity=Access validity date range CantDisableYourself=You can't disable your own user record ForceUserExpenseValidator=Force expense report validator ForceUserHolidayValidator=Force leave request validator diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 12d9677c4b5..3622d77de2f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1354,6 +1354,9 @@ table[summary="list_of_modules"] .fa-cog { .width125 { width: 125px; } .width150 { width: 150px; } .width200 { width: 200px; } +.width300 { width: 300px; } +.width400 { width: 400px; } +.width500 { width: 500px; } .maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 87a9d6b1b47..7b49acc63b5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1390,6 +1390,9 @@ table[summary="list_of_modules"] .fa-cog { .width125 { width: 125px; } .width150 { width: 150px; } .width200 { width: 200px; } +.width300 { width: 300px; } +.width400 { width: 400px; } +.width500 { width: 500px; } .maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 57d5c44615f..9d2039a4678 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -839,54 +839,6 @@ if ($action == 'create' || $action == 'adduserldap') { } $password = (GETPOSTISSET('password') ?GETPOST('password') : $generated_password); - // Password - print ''.$langs->trans("Password").''; - print ''; - $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) { - $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("PasswordOfUserInLDAP"); - } - if (preg_match('/http/', $dolibarr_main_authentication)) { - $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("HTTPBasicPassword"); - } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { - if (!empty($ldap_pass)) { // For very old system comaptibilty. Now clear password can't be viewed from LDAP read - $valuetoshow .= ($valuetoshow ? ', ' : '').''; // Dolibarr password is preffiled with LDAP known password - $valuetoshow .= preg_replace('/./i', '*', $ldap_pass); - } else { - // We do not use a field password but a field text to show new password to use. - $valuetoshow .= ($valuetoshow ? ', ' : '').''; - } - } - - // Other form for user password - $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password); - $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook > 0) { - $valuetoshow = $hookmanager->resPrint; // to replace - } else { - $valuetoshow .= $hookmanager->resPrint; // to add - } - - print $valuetoshow; - print ''; - - if (!empty($conf->api->enabled)) { - // API key - //$generated_password = getRandomPassword(false); - print ''.$langs->trans("ApiKey").''; - print ''; - print ''; - if (!empty($conf->use_javascript_ajax)) { - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); - } - print ''; - } else { - // PARTIAL WORKAROUND - $generated_fake_api_key = getRandomPassword(false); - print ''; - } - // Administrator if (!empty($user->admin)) { print ''.$langs->trans("Administrator").''; @@ -936,10 +888,11 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; // Employee - $defaultemployee = 1; + $defaultemployee = '1'; print ''; print ''.$langs->trans('Employee').''; - print $form->selectyesno("employee", (GETPOST('employee') != '' ?GETPOST('employee') : $defaultemployee), 1); + print ''; + //print $form->selectyesno("employee", (GETPOST('employee') != '' ?GETPOST('employee') : $defaultemployee), 1); print ''; // Hierarchy @@ -979,6 +932,70 @@ if ($action == 'create' || $action == 'adduserldap') { print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); print ''; + + print '
    '; + + + // Date validity + print ''; + print ''; + print "\n"; + + // Password + print ''; + print ''; + + if (!empty($conf->api->enabled)) { + // API key + //$generated_password = getRandomPassword(false); + print ''; + print ''; + } else { + // PARTIAL WORKAROUND + $generated_fake_api_key = getRandomPassword(false); + print ''; + } + + print '
    '.$langs->trans("RangeOfLoginValidity").''; + print $form->selectDate($datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1); + + print '   '; + + print $form->selectDate($dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); + print '
    '.$langs->trans("Password").''; + $valuetoshow = ''; + if (preg_match('/ldap/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("PasswordOfUserInLDAP"); + } + if (preg_match('/http/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("HTTPBasicPassword"); + } + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { + if (!empty($ldap_pass)) { // For very old system comaptibilty. Now clear password can't be viewed from LDAP read + $valuetoshow .= ($valuetoshow ? ', ' : '').''; // Dolibarr password is preffiled with LDAP known password + $valuetoshow .= preg_replace('/./i', '*', $ldap_pass); + } else { + // We do not use a field password but a field text to show new password to use. + $valuetoshow .= ($valuetoshow ? ', ' : '').''; + } + } + + // Other form for user password + $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password); + $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } + + print $valuetoshow; + print '
    '.$langs->trans("ApiKey").''; + print ''; + if (!empty($conf->use_javascript_ajax)) { + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); + } + print '

    '; @@ -1223,17 +1240,6 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; print "\n"; - // Date validity - print ''; - print ''; - print "\n"; - // Date birth print ''; print '
    '.$langs->trans("RangeOfLoginValidity").''; - print $form->selectDate($datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1); - - print ' - '; - - print $form->selectDate($dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); - print '
    '.$langs->trans("DateOfBirth").''; @@ -1371,7 +1377,7 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; // Login - print ''; + print ''; if (!empty($object->ldap_sid) && $object->statut == 0) { print ''; } else { @@ -1379,72 +1385,6 @@ if ($action == 'create' || $action == 'adduserldap') { } print ''."\n"; - // Password - print ''; - - print '"; - print ''."\n"; - - // API key - if (!empty($conf->api->enabled) && $user->admin) { - print ''; - print ''; - } - // Administrator print ''."\n"; // TODO Move this into tab RH, visible when salarie or RH is visible (HierarchicalResponsible must be on both tab) @@ -1604,20 +1545,6 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; print "\n"; - // Date login validity - print ''; - print ''; - print "\n"; - // Date of birth print ''; print ''; print ''; - // Pass - print ''; - print '\n"; - - // API key - if (!empty($conf->api->enabled) && $user->admin) { - print ''; - print ''; - } - // Administrator print ''; if ($object->socid > 0) { @@ -2145,13 +2123,15 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; print ''; @@ -2246,6 +2226,74 @@ if ($action == 'create' || $action == 'adduserldap') { } print ''; + + print '
    '.$langs->trans("Login").'
    '.$langs->trans("Login").''.$langs->trans("LoginAccountDisableInDolibarr").'
    '.$langs->trans("Password").''; - $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) { - if (!empty($object->ldap_sid)) { - if ($passDoNotExpire) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("LdapUacf_".$statutUACF); - } elseif ($userChangePassNextLogon) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("UserMustChangePassNextLogon", $ldap->domainFQDN).''; - } elseif ($userDisabled) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("LdapUacf_".$statutUACF, $ldap->domainFQDN).''; - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); - } - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); - } - } - if (preg_match('/http/', $dolibarr_main_authentication)) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("HTTPBasicPassword"); - } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { - if ($object->pass) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); - $valuetoshow .= ''.$langs->trans("Hidden").''; - } else { - if ($user->admin && $user->id == $object->id) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); - //$valuetoshow .= ''.$langs->trans("Crypted").' - '; - $valuetoshow .= ''.$langs->trans("Hidden").''; - // TODO Add a feature to reveal the hash - $valuetoshow .= ''; - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("Hidden").''; - } - } - } - - // Other form for user password - $parameters = array('valuetoshow' => $valuetoshow); - $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook > 0) { - $valuetoshow = $hookmanager->resPrint; // to replace - } else { - $valuetoshow .= $hookmanager->resPrint; // to add - } - - print $valuetoshow; - print "
    '.$langs->trans("ApiKey").''; - if (!empty($object->api_key)) { - print ''.preg_replace('/./', '*', $object->api_key).''; - } - if ($user->admin || $user->id == $object->id) { - // TODO Add a feature to reveal the hash - } - print '
    '.$langs->trans("Administrator").''; if (!empty($conf->multicompany->enabled) && $object->admin && !$object->entity) { @@ -1480,7 +1420,8 @@ if ($action == 'create' || $action == 'adduserldap') { // Employee print '
    '.$langs->trans("Employee").''; - print yn($object->employee); + print 'employee ? ' checked="checked"' : '').'>'; + //print yn($object->employee); print '
    '.$langs->trans("RangeOfLoginValidity").''; - if ($object->datestartvalidity) { - print ''.$langs->trans("FromDate").' '; - print dol_print_date($object->datestartvalidity, 'day'); - } - if ($object->dateendvalidity) { - print ' - '.$langs->trans("To").' '; - print dol_print_date($object->dateendvalidity, 'day'); - } - print '
    '.$langs->trans("DateOfBirth").''; @@ -1637,6 +1564,7 @@ if ($action == 'create' || $action == 'adduserldap') { print '
    '; print '
    '; + print ''; // Color user @@ -1755,7 +1683,7 @@ if ($action == 'create' || $action == 'adduserldap') { print dol_htmlentitiesbr($object->signature); print "\n"; - //VCard + // VCard print ''; print '\n"; print "
    '.$langs->trans("VCard").''; print ''; @@ -1765,6 +1693,97 @@ if ($action == 'create' || $action == 'adduserldap') { print "
    \n"; + + + print '
    '; + print ''; + print ''; + print ''; + print ''; + + // Date login validity + print ''; + print ''; + print "\n"; + + // Password + print ''; + + print '"; + print ''."\n"; + + // API key + if (!empty($conf->api->enabled) && $user->admin) { + print ''; + print ''; + } + print '
    '; + print $langs->trans("Credentials"); + print '
    '.$langs->trans("RangeOfLoginValidity").''; + if ($object->datestartvalidity) { + print ''.$langs->trans("FromDate").' '; + print dol_print_date($object->datestartvalidity, 'day'); + } + if ($object->dateendvalidity) { + print ' - '.$langs->trans("To").' '; + print dol_print_date($object->dateendvalidity, 'day'); + } + print '
    '.$langs->trans("Password").''; + $valuetoshow = ''; + if (preg_match('/ldap/', $dolibarr_main_authentication)) { + if (!empty($object->ldap_sid)) { + if ($passDoNotExpire) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("LdapUacf_".$statutUACF); + } elseif ($userChangePassNextLogon) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("UserMustChangePassNextLogon", $ldap->domainFQDN).''; + } elseif ($userDisabled) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("LdapUacf_".$statutUACF, $ldap->domainFQDN).''; + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); + } + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); + } + } + if (preg_match('/http/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("HTTPBasicPassword"); + } + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { + if ($object->pass) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); + $valuetoshow .= ''.$langs->trans("Hidden").''; + } else { + if ($user->admin && $user->id == $object->id) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); + //$valuetoshow .= ''.$langs->trans("Crypted").' - '; + $valuetoshow .= ''.$langs->trans("Hidden").''; + // TODO Add a feature to reveal the hash + $valuetoshow .= ''; + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("Hidden").''; + } + } + } + + // Other form for user password + $parameters = array('valuetoshow' => $valuetoshow); + $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } + + print $valuetoshow; + print "
    '.$langs->trans("ApiKey").''; + if (!empty($object->api_key)) { + print ''.preg_replace('/./', '*', $object->api_key).''; + } + if ($user->admin || $user->id == $object->id) { + // TODO Add a feature to reveal the hash + } + print '
    '; + print '
    '; print '
    '; @@ -2011,47 +2030,6 @@ if ($action == 'create' || $action == 'adduserldap') { print '
    '.$langs->trans("Password").''; - $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); - } - if (preg_match('/http/', $dolibarr_main_authentication)) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$form->textwithpicto($text, $langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless", $dolibarr_main_authentication), 1, 'warning'); - } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { - if ($caneditpassword) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''; - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').preg_replace('/./i', '*', $object->pass); - } - } - - // Other form for user password - $parameters = array('valuetoshow' => $valuetoshow, 'caneditpassword' => $caneditpassword); - $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook > 0) { - $valuetoshow = $hookmanager->resPrint; // to replace - } else { - $valuetoshow .= $hookmanager->resPrint; // to add - } - - print $valuetoshow; - print "
    '.$langs->trans("ApiKey").''; - print ''; - if (!empty($conf->use_javascript_ajax)) { - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); - } - print '
    '.$langs->trans("Administrator").'
    '.$form->editfieldkey('Employee', 'employee', '', $object, 0).''; if ($caneditfield) { - print $form->selectyesno("employee", $object->employee, 1); + print 'employee ? ' checked="checked"' : '').'>'; + //print $form->selectyesno("employee", $object->employee, 1); } else { - if ($object->employee) { + print 'employee ? ' checked="checked"' : '').'>'; + /*if ($object->employee) { print $langs->trans("Yes"); } else { print $langs->trans("No"); - } + }*/ } print '

    '; + + + // Date access validity + print ''; + print ''; + print "\n"; + + // Pass + print ''; + print '\n"; + + // API key + if (!empty($conf->api->enabled) && $user->admin) { + print ''; + print ''; + } + + print '
    '.$langs->trans("RangeOfLoginValidity").''; + if ($caneditfield) { + print $form->selectDate($datestartvalidity ? $datestartvalidity : $object->datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1, 0, '', '', '', '', 1, '', ''); + } else { + print dol_print_date($object->datestartvalidity, 'day'); + } + + /*if ($datestartvalidity && $dateendvalidity) { + print ' - '; + }*/ + print '   '; + + if ($caneditfield) { + print $form->selectDate($dateendvalidity ? $datendevalidity : $object->dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0, 0, '', '', '', '', 1, '', ''); + } else { + print dol_print_date($object->dateendvalidity, 'day'); + } + print '
    '.$langs->trans("Password").''; + $valuetoshow = ''; + if (preg_match('/ldap/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); + } + if (preg_match('/http/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$form->textwithpicto($text, $langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless", $dolibarr_main_authentication), 1, 'warning'); + } + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { + if ($caneditpassword) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''; + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').preg_replace('/./i', '*', $object->pass); + } + } + + // Other form for user password + $parameters = array('valuetoshow' => $valuetoshow, 'caneditpassword' => $caneditpassword); + $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } + + print $valuetoshow; + print "
    '.$langs->trans("ApiKey").''; + print ''; + if (!empty($conf->use_javascript_ajax)) { + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); + } + print '

    '; @@ -2636,29 +2684,6 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; print "\n"; - - // Date login validity - print ''; - print ''; - print "\n"; - - // Date birth print ''; print '
    '.$langs->trans("RangeOfLoginValidity").''; - if ($caneditfield) { - print $form->selectDate($datestartvalidity ? $datestartvalidity : $object->datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1); - } else { - print dol_print_date($object->datestartvalidity, 'day'); - } - - if ($datestartvalidity && $dateendvalidity) { - print ' - '; - } - - if ($caneditfield) { - print $form->selectDate($dateendvalidity ? $datendevalidity : $object->dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); - } else { - print dol_print_date($object->dateendvalidity, 'day'); - } - print '
    '.$langs->trans("DateOfBirth").'';