';
@@ -11398,7 +11398,7 @@ class Form
$ret .= '' . $langs->trans('AllFieldsRequired') . '
';
$ret .= '';
- $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 .= '
';
$ret .= '';
diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php
index f0f1cd22712..5ab75d02fac 100644
--- a/htdocs/core/customreports.php
+++ b/htdocs/core/customreports.php
@@ -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)) {
diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php
index d58a0746701..2706b1efd63 100644
--- a/htdocs/core/js/lib_head.js.php
+++ b/htdocs/core/js/lib_head.js.php
@@ -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";
diff --git a/htdocs/core/lib/customreports.lib.php b/htdocs/core/lib/customreports.lib.php
index 574faafeabb..4922005b4d5 100644
--- a/htdocs/core/lib/customreports.lib.php
+++ b/htdocs/core/lib/customreports.lib.php
@@ -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')) {