diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 68bba0e04b5..98ba6ca3cc2 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -193,12 +193,12 @@ class Form
* @param object $object Object
* @param boolean $perm Permission to allow button to edit parameter
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols%', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datepickerhour', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select;xkey:xval,ykey:yval,...')
- * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value
+ * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of numeric value). Use '' to use same than $value
* @param object $extObject External object
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
* @param string $moreparam More param to add on the form action href URL
* @param int $notabletag Do no output table tags
- * @param string $formatfunc Call a specific function to output field
+ * @param string $formatfunc Call a specific function to output field in view mode (For example: 'dol_print_email')
* @param string $paramid Key of parameter for id ('id', 'socid')
* @return string HTML edit field
*/
@@ -214,7 +214,7 @@ class Form
}
// When option to edit inline is activated
- if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;|datehourpicker/', $typeofdata)) { // TODO add jquery timepicker and support select
+ if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;|day|datepicker|dayhour|datehourpicker/', $typeofdata)) { // TODO add jquery timepicker and support select
$ret .= $this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg);
} else {
$editmode = (GETPOST('action', 'aZ09') == 'edit'.$htmlname);
@@ -236,7 +236,7 @@ class Form
} elseif (preg_match('/^(numeric|amount)/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
$valuetoshow = price2num($editvalue ? $editvalue : $value);
- $ret .= '';
+ $ret .= '';
} elseif (preg_match('/^(checkbox)/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
$ret .= '';
@@ -8679,7 +8679,7 @@ class Form
*/
public function showrefnav($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $morehtmlright = '')
{
- global $langs, $conf, $hookmanager, $extralanguages;
+ global $conf, $langs, $hookmanager, $extralanguages;
$ret = '';
if (empty($fieldid)) {
@@ -8691,7 +8691,7 @@ class Form
// Preparing gender's display if there is one
$addgendertxt = '';
- if (!empty($object->gender)) {
+ if (property_exists($object, 'gender') && !empty($object->gender)) {
$addgendertxt = ' ';
switch ($object->gender) {
case 'man':
@@ -8705,6 +8705,15 @@ class Form
break;
}
}
+ /*
+ $addadmin = '';
+ if (property_exists($object, 'admin')) {
+ if (!empty($conf->multicompany->enabled) && !empty($object->admin) && empty($object->entity)) {
+ $addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"');
+ } elseif (!empty($object->admin)) {
+ $addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"');
+ }
+ }*/
// Add where from hooks
if (is_object($hookmanager)) {
@@ -8837,7 +8846,7 @@ class Form
$ret .= dol_htmlentities($fullname).$addgendertxt.((!empty($object->societe) && $object->societe != $fullname) ? ' ('.dol_htmlentities($object->societe).')' : '');
}
} elseif (in_array($object->element, array('contact', 'user', 'usergroup'))) {
- $ret .= dol_htmlentities($object->getFullName($langs)).$addgendertxt;
+ $ret .= dol_htmlentities($object->getFullName($langs));
} elseif (in_array($object->element, array('action', 'agenda'))) {
$ret .= $object->ref.' '.$object->label;
} elseif (in_array($object->element, array('adherent_type'))) {
@@ -9085,7 +9094,7 @@ class Form
}
$ret .= '
';
if ($object->photo) {
- $ret .= '
'.$langs->trans("Delete").'
';
+ $ret .= '
';
}
$ret .= '
';
$ret .= '
';
diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php
index 292fc227db5..abeca50b77d 100644
--- a/htdocs/core/modules/modUser.class.php
+++ b/htdocs/core/modules/modUser.class.php
@@ -49,7 +49,7 @@ class modUser extends DolibarrModules
$this->module_position = '05';
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i', '', get_class($this));
- $this->description = "Gestion des utilisateurs (requis)";
+ $this->description = "Management of users and groups of users (mandatory)";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
@@ -90,7 +90,7 @@ class modUser extends DolibarrModules
$r++;
$this->rights[$r][0] = 251;
- $this->rights[$r][1] = 'Read information of other users';
+ $this->rights[$r][1] = 'Read information of other users, groups and permissions';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'user';
@@ -101,12 +101,12 @@ class modUser extends DolibarrModules
$this->rights[$r][1] = 'Read permissions of other users';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
- $this->rights[$r][4] = 'user_advance';
+ $this->rights[$r][4] = 'user_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
$this->rights[$r][5] = 'readperms';
$r++;
$this->rights[$r][0] = 253;
- $this->rights[$r][1] = 'Create/modify internal and external users';
+ $this->rights[$r][1] = 'Create/modify internal and external users, groups and permissions';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'user';
@@ -117,7 +117,7 @@ class modUser extends DolibarrModules
$this->rights[$r][1] = 'Create/modify external users only';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
- $this->rights[$r][4] = 'user_advance';
+ $this->rights[$r][4] = 'user_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
$this->rights[$r][5] = 'write';
$r++;
@@ -170,7 +170,7 @@ class modUser extends DolibarrModules
$r++;
$this->rights[$r][0] = 351;
- $this->rights[$r][1] = 'Consulter les groupes';
+ $this->rights[$r][1] = 'Read groups';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
@@ -178,7 +178,7 @@ class modUser extends DolibarrModules
$r++;
$this->rights[$r][0] = 352;
- $this->rights[$r][1] = 'Consulter les permissions des groupes';
+ $this->rights[$r][1] = 'Read permissions of groups';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
@@ -186,7 +186,7 @@ class modUser extends DolibarrModules
$r++;
$this->rights[$r][0] = 353;
- $this->rights[$r][1] = 'Creer/modifier les groupes et leurs permissions';
+ $this->rights[$r][1] = 'Create/modify groups and permissions';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
@@ -194,7 +194,7 @@ class modUser extends DolibarrModules
$r++;
$this->rights[$r][0] = 354;
- $this->rights[$r][1] = 'Supprimer ou desactiver les groupes';
+ $this->rights[$r][1] = 'Delete groups';
$this->rights[$r][2] = 'd';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 2fd4c7c966f..6aa2a066e89 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -1432,7 +1432,7 @@ table[summary="list_of_modules"] .fa-cog {
.minheight40 { min-height: 40px; }
.titlefieldcreate { width: 20%; }
.titlefield { /* width: 25%; */ width: 250px; }
-.titlefieldmiddle { width: 50%; }
+.titlefieldmiddle { width: 45%; }
.titlefieldmax45 { max-width: 45%; }
.imgmaxwidth180 { max-width: 180px; }
.imgmaxheight50 { max-height: 50px; }
@@ -3385,6 +3385,15 @@ td.border, div.tagtable div div.border {
width:auto;
}
+/* To have left column sticky
+.tagtable td[data-key="ref"] {
+ position: sticky;
+ left: 0;
+ top: 0;
+ max-width: 150px !important;
+}
+*/
+
/* Main boxes */
.nobordertop, .nobordertop tr:first-of-type td {
@@ -4471,7 +4480,7 @@ div.titre {
}
div.fiche > table.table-fiche-title:first-of-type div {
color: var(--colortexttitlenotab);
- font-size: 1.05em;
+ font-size: 1.1em;
/* text-transform: uppercase; */
/* font-weight: 600; */
}
diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php
index 3fe2552c86a..d1d47c568c5 100644
--- a/htdocs/theme/eldy/info-box.inc.php
+++ b/htdocs/theme/eldy/info-box.inc.php
@@ -150,13 +150,14 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
cursor: default;
font-size: 10px;
- line-height: 22px;
- padding: 0px 3px;
+ line-height: 1.5em;
+ padding: 4px 3px;
text-align: center;
opacity: 1;
-webkit-transition: opacity 0.5s, visibility 0s 0.5s;
transition: opacity 0.5s, visibility 0s 0.5s;
}
+
.box-flex-item.info-box-module.--disabled {
/* opacity: 0.6; */
}
diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php
index a363475c409..a4af0081aeb 100644
--- a/htdocs/theme/md/info-box.inc.php
+++ b/htdocs/theme/md/info-box.inc.php
@@ -242,8 +242,8 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
cursor: default;
font-size: 10px;
- line-height: 22px;
- padding: 0px 3px;
+ line-height: 1.5em;
+ padding: 4px 3px;
text-align: center;
opacity: 1;
-webkit-transition: opacity 0.5s, visibility 0s 0.5s;
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 6bf0cc66c7c..fa4c7231de5 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -203,8 +203,17 @@ if ($action == 'update' && !$cancel && $permissiontoaddbankaccount) {
}
}
+// update birth
+if ($action == 'setbirth' && $canadduser && !$cancel) {
+ $object->birth = dol_mktime(0, 0, 0, GETPOST('birthmonth', 'int'), GETPOST('birthday', 'int'), GETPOST('birthyear', 'int'));
+ $result = $object->update($user);
+ if ($result < 0) {
+ setEventMessages($object->error, $object->errors, 'errors');
+ }
+}
+
// update personal email
-if ($action == 'setpersonal_email' && $canadduser) {
+if ($action == 'setpersonal_email' && $canadduser && !$cancel) {
$object->personal_email = (string) GETPOST('personal_email', 'alphanohtml');
$result = $object->update($user);
if ($result < 0) {
@@ -213,7 +222,7 @@ if ($action == 'setpersonal_email' && $canadduser) {
}
// update personal mobile
-if ($action == 'setpersonal_mobile' && $canadduser) {
+if ($action == 'setpersonal_mobile' && $canadduser && !$cancel) {
$object->personal_mobile = (string) GETPOST('personal_mobile', 'alphanohtml');
$result = $object->update($user);
if ($result < 0) {
@@ -288,23 +297,160 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print '
\n";
+
+ // Sensitive salary/value information
+ if ((empty($user->socid) && in_array($id, $childids)) // A user can always see salary/value information for its subordinates
+ || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall))
+ || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) {
+ $langs->load("salaries");
+
+ // Salary
+ print '
'."\n";
- // TODO Move this into tab RH, visible when salarie or RH is visible (HierarchicalResponsible must be on both tab)
+ // TODO This is also available into the tab RH
// Hierarchy
print '
\n";
+
+ // Sensitive salary/value information
+ if ((empty($user->socid) && in_array($id, $childids)) // A user can always see salary/value information for its subordinates
|| (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall))
|| (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) {
- // Even a superior can't see this info of its subordinates wihtout $user->rights->salaries->read and $user->rights->hrm->employee->read (setting/viewing is reserverd to HR people).
- // However, he can see the valuation of timesheet of its subordinates even without these permissions.
$langs->load("salaries");
+ // Salary
+ print '
';
-
// Accountancy code
if (!empty($conf->accounting->enabled)) {
print "
";
@@ -2637,14 +2637,6 @@ if ($action == 'create' || $action == 'adduserldap') {
// TODO Move this into tab RH (HierarchicalResponsible must be on both tab)
- // Default warehouse
- if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) {
- print '
\n";
+
+ // Sensitive salary/value information
+ if ((empty($user->socid) && in_array($id, $childids)) // A user can always see salary/value information for its subordinates
|| (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall))
|| (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) {
- $langs->load("salaries");
+ $langs->load("salaries");
+
+ // Salary
+ print '