2
0
forked from Wavyzz/dolibarr

Debug v21

This commit is contained in:
ldestailleur
2025-02-22 13:57:07 +01:00
parent fc30630f1c
commit be76a4bca6
4 changed files with 10 additions and 10 deletions

View File

@@ -11243,7 +11243,7 @@ class Form
$search_component_params_hidden = '(' . $search_component_params_hidden . ')';
}
$ret = '';
$ret = '<!-- searchComponent -->';
$ret .= '<div class="divadvancedsearchfieldcomp centpercent inline-block">';
$ret .= '<a href="#" class="dropdownsearch-toggle unsetcolor">';
@@ -11398,7 +11398,7 @@ class Form
$ret .= '<p class="assistance-errors error" style="display:none">' . $langs->trans('AllFieldsRequired') . ' </p>';
$ret .= '<div class="operand">';
$ret .= $form->selectarray('search_filter_field', $arrayoffilterfieldslabel, '', $langs->trans("Fields"), 0, 0, '', 0, 0, 0, '', 'width250', 1);
$ret .= $form->selectarray('search_filter_field', $arrayoffilterfieldslabel, '', $langs->trans("Fields"), 0, 0, '', 0, 0, 0, '', 'width200 combolargeelem', 1);
$ret .= '</div>';
$ret .= '<span class="separator"></span>';

View File

@@ -38,6 +38,8 @@
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*
* @var array $toselect
*/
if (!defined('USE_CUSTOM_REPORT_AS_INCLUDE')) {
@@ -87,13 +89,12 @@ if (!defined('USE_CUSTOM_REPORT_AS_INCLUDE')) {
$object = null;
} else {
// When included
// When included into a main page
'
@phan-var-force int<0,1> $SHOWLEGEND
@phan-var-force string customreportkey
';
$langs->load("main");
// $search_measures, $search_xaxis or $search_yaxis may have been defined by the parent.
if (empty($user) || empty($user->id)) {

View File

@@ -1122,9 +1122,11 @@ function getParameterByName(name, valueifnotfound)
}
/**
* Get the list of operators for a given field type
* Get the list of possible operators for a given field type that we can use in the generic filter.
*/
function getOperatorsForFieldType(type, maybenull = 0) {
console.log('Get list of operators for type='+type);
// Define the list of operators for each general field category
const operatorList = {
selectlink: {
@@ -1160,15 +1162,12 @@ function getOperatorsForFieldType(type, maybenull = 0) {
}
};
// Determine the general category for the given type using regex
let generalType = "";
console.log('Get list of operators for type='+type);
if (/^select$/i.test(type) || /^link$/i.test(type)) {
generalType = "selectlink";
} else if (/^(varchar|char|text|blob|nchar|mediumtext|longtext)\(\d+\)$/i.test(type) || /^varchar$/i.test(type)) {
} else if (/^(varchar|char|text|blob|nchar|mediumtext|longtext)\(\d+\)$/i.test(type) || /^(varchar|mail|phone|ip)$/i.test(type)) {
generalType = "text";
} else if (/^(int|integer|float|double|decimal|numeric)(\(\d+,\d+\))?$/i.test(type)) {
generalType = "number";

View File

@@ -546,7 +546,7 @@ function fillArrayOfFilterFields($object, $tablealias, $labelofobject, &$arrayof
// Exclude some fields
if (in_array($key, array(
'id', 'ref_ext', 'rowid', 'entity', 'last_main_doc', 'logo', 'logo_squarred', 'extraparams',
'parent', 'photo', 'socialnetworks', 'webservices_url', 'webservices_key'))) {
'parent', 'pass', 'pass_crypted', 'pass_temp', 'photo', 'socialnetworks', 'webservices_url', 'webservices_key'))) {
continue;
}
if (isset($val['enabled']) && ! (int) dol_eval($val['enabled'], 1, 1, '1')) {