Date: Sat, 27 Apr 2024 03:24:20 +0200
Subject: [PATCH 7/8] Fix CSS
---
htdocs/user/hierarchy.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php
index 52d11123b0c..60f1d2f9b49 100644
--- a/htdocs/user/hierarchy.php
+++ b/htdocs/user/hierarchy.php
@@ -298,8 +298,8 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
print '| | ';
print ' | ';
// Status
- print '';
- print $form->selectarray('search_statut', array('-1'=>'', '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
+ print ' | ';
+ print $form->selectarray('search_statut', array('-1'=>'', '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp onrightofpage width100');
print ' | ';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
@@ -317,7 +317,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
}
print_liste_field_titre("HierarchicView");
print_liste_field_titre('', $_SERVER['PHP_SELF'], "", '', "", 'align="center"');
- print_liste_field_titre("Status", $_SERVER['PHP_SELF'], "", '', "", '', '', '', 'right ');
+ print_liste_field_titre("Status", $_SERVER['PHP_SELF'], "", '', "", '', '', '', 'right onrightofpage');
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch ');
From 2f1dcbc2add75d0527fe0e57846d6880a30f5c98 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sat, 27 Apr 2024 03:27:25 +0200
Subject: [PATCH 8/8] Fix filter on status in hierarchy page
---
htdocs/user/hierarchy.php | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php
index 60f1d2f9b49..31cc151b664 100644
--- a/htdocs/user/hierarchy.php
+++ b/htdocs/user/hierarchy.php
@@ -51,13 +51,13 @@ $sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
-$search_statut = GETPOST('search_statut', 'int');
-if ($search_statut == '' || $search_statut == '0') {
- $search_statut = '1';
+$search_status = GETPOST('search_statut', 'int') ? GETPOST('search_statut', 'int') : GETPOST('search_status', 'int');
+if ($search_status === '') {
+ $search_status = '1';
}
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
- $search_statut = "";
+ $search_status = "";
}
$search_employee = -1;
@@ -106,8 +106,8 @@ $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css
llxHeader('', $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', 'bodyforlist');
$filters = [];
-if (($search_statut != '' && $search_statut >= 0)) {
- $filters[] = "statut = ".((int) $search_statut);
+if (($search_status != '' && $search_status >= 0)) {
+ $filters[] = "statut = ".((int) $search_status);
}
if (($search_employee != '' && $search_employee >= 0)) {
$filters[] = "employee = ".((int) $search_employee);
@@ -256,7 +256,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
}
//var_dump($data);exit;
- $param = "&search_statut=".urlencode($search_statut);
+ $param = "&search_status=".urlencode($search_status);
$param = "&contextpage=".urlencode($contextpage);
$newcardbutton = '';
@@ -299,7 +299,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
print ' | ';
// Status
print '';
- print $form->selectarray('search_statut', array('-1'=>'', '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp onrightofpage width100');
+ print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('Disabled'), '1'=>$langs->trans('Enabled')), $search_status, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp onrightofpage width100');
print ' | ';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {