2
0
forked from Wavyzz/dolibarr

Debug v22

This commit is contained in:
ldestailleur
2025-07-21 10:47:45 +02:00
parent 75e78f8a77
commit a800af3b91
4 changed files with 34 additions and 15 deletions

View File

@@ -91,7 +91,7 @@ if ($socid < 0) {
$socid = '';
}
$canedit = 1;
$canedit = 1; // can read events of others
if (!$user->hasRight('agenda', 'myactions', 'read')) {
accessforbidden();
}
@@ -1499,6 +1499,7 @@ $link = '';
// Show div with list of calendars
print $s;
// Top filters
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, '', (string) $filtert, '', $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid, $search_categ_cus);
print '</div>';
@@ -1543,13 +1544,13 @@ while ($currentdaytoshow < $lastdaytoshow) {
print $langs->trans("DaysOfWeek").'</span>';
print "\n";
print '<div class="ui-grid-a inline-block"><div class="ui-block-a nowraponall">';
print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">';
print '<input type="number" class="shortbis" name="begin_d" value="'.$begin_d.'" min="1" max="7">';
if (empty($conf->dol_use_jmobile)) {
print ' - ';
} else {
print '</div><div class="ui-block-b">';
}
print '<input type="number" class="short" name="end_d" value="'.$end_d.'" min="1" max="7">';
print '<input type="number" class="shortbis" name="end_d" value="'.$end_d.'" min="1" max="7">';
print '</div></div>';
}
@@ -1582,13 +1583,13 @@ while ($currentdaytoshow < $lastdaytoshow) {
print $langs->trans("Hours").'</span>';
print "\n";
print '<div class="ui-grid-a inline-block"><div class="ui-block-a nowraponall">';
print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">';
print '<input type="number" class="shortbis" name="begin_h" value="'.$begin_h.'" min="0" max="23">';
if (empty($conf->dol_use_jmobile)) {
print ' - ';
} else {
print '</div><div class="ui-block-b">';
}
print '<input type="number" class="short" name="end_h" value="'.$end_h.'" min="1" max="24">';
print '<input type="number" class="shortbis" name="end_h" value="'.$end_h.'" min="1" max="24">';
if (empty($conf->dol_use_jmobile)) {
print ' '.$langs->trans("HourShort");
}

View File

@@ -2140,7 +2140,7 @@ class Form
* @param int<0,1>|string $show_empty 0=list with no empty value, 1=add also an empty value into list
* @param int[]|null $exclude Array list of users id to exclude
* @param int $disabled If select list must be disabled
* @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
* @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. Use '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
* @param int[]|'' $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled
* @param string $force_entity '0' or list of Ids of environment to force, separated by a comma, or 'default' = do no extend to all entities allowed to superadmin.
* @param int $maxlength Maximum length of string into list (0=no limit)
@@ -2173,22 +2173,33 @@ class Form
$selected = array($selected);
}
// Exclude some users in $excludeUsers string
$excludeUsers = null;
$includeUsers = null;
// Exclude some users
if (is_array($exclude)) {
$excludeUsers = implode(",", $exclude);
}
// Include some uses
// Include some users in $includeUsers string
$includeUsers = null;
$includeUsersArray = array();
if (is_array($include)) {
$includeUsers = implode(",", $include);
$includeUsersArray = $include;
} elseif ($include == 'hierarchy') {
// Build list includeUsers to have only hierarchy
$includeUsers = implode(",", $user->getAllChildIds(0));
// Build list includeUsersArray to have only hierarchy
$includeUsersArray = $user->getAllChildIds(0);
} elseif ($include == 'hierarchyme') {
// Build list includeUsers to have only hierarchy and current user
// Build list includeUsersArray to have only hierarchy and current user
$includeUsersArray = $user->getAllChildIds(1);
}
// Get list of allowed users
if (!$user->hasRight('user', 'user', 'lire')) {
if (empty($includeUsersArray)) {
$includeUsers = implode(",", $user->getAllChildIds(1));
} else {
$includeUsers = implode(",", array_intersect($includeUsersArray, $user->getAllChildIds(1)));
}
} else {
$includeUsers = implode(",", $includeUsersArray);
}
$num = 0;

View File

@@ -542,6 +542,9 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment {
input.short {
width: 40px;
}
input.shortbis {
width: 48px;
}
.nofocusvisible:focus-visible {
outline: none;
}

View File

@@ -668,9 +668,13 @@ input, select {
input.button.massactionconfirmed {
margin: 4px;
}
input.short {
width: 40px;
}
input.shortbis {
width: 48px;
}
input:invalid, select:invalid, input.--error , select.--error {
border-color: #ea1212;