*
* This program is free software; you can redistribute it and/or modify
@@ -461,6 +460,7 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '';
}
foreach ($object->fields as $key => $val) {
+ //$searchkey = empty($search[$key]) ? '' : $search[$key];
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
@@ -472,13 +472,11 @@ foreach ($object->fields as $key => $val) {
$cssforfield .= ($cssforfield ? ' ' : '').'right';
}
if (!empty($arrayfields['t.'.$key]['checked'])) {
- print '| ';
+ print ' | ';
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
- print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1);
- } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) {
- print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1);
- } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
- print '';
+ print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), 1, 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status width100 onrightofpage' : ''), 1);
+ } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
+ print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
print '';
print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
@@ -486,6 +484,12 @@ foreach ($object->fields as $key => $val) {
print ' ';
print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print ' ';
+ } elseif ($key == 'lang') {
+ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
+ $formadmin = new FormAdmin($db);
+ print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
+ } else {
+ print ' ';
}
print ' | ';
}
diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
index de3b0bb538f..b575cc8678b 100644
--- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php
+++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
@@ -72,7 +72,7 @@ class CashControl extends CommonObject
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
*/
public $fields = array(
- 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 10),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 15),
'ref' => array('type' => 'varchar(64)', 'label' => 'Ref', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 18),
'posmodule' => array('type' => 'varchar(30)', 'label' => 'Module', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 19),
@@ -82,9 +82,9 @@ class CashControl extends CommonObject
'cash' => array('type' => 'price', 'label' => 'Cash', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'csslist' => 'amount'),
'cheque' => array('type' => 'price', 'label' => 'Cheque', 'enabled' => 1, 'visible' => 1, 'position' => 33, 'csslist' => 'amount'),
'card' => array('type' => 'price', 'label' => 'CreditCard', 'enabled' => 1, 'visible' => 1, 'position' => 36, 'csslist' => 'amount'),
- 'year_close' => array('type' => 'integer', 'label' => 'Year close', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 50, 'css' => 'center'),
- 'month_close' => array('type' => 'integer', 'label' => 'Month close', 'enabled' => 1, 'visible' => 1, 'position' => 55, 'css' => 'center'),
- 'day_close' => array('type' => 'integer', 'label' => 'Day close', 'enabled' => 1, 'visible' => 1, 'position' => 60, 'css' => 'center'),
+ 'year_close' => array('type' => 'integer', 'label' => 'Year', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 50, 'css' => 'center'),
+ 'month_close' => array('type' => 'integer', 'label' => 'Month', 'enabled' => 1, 'visible' => 1, 'position' => 55, 'css' => 'center'),
+ 'day_close' => array('type' => 'integer', 'label' => 'Day', 'enabled' => 1, 'visible' => 1, 'position' => 60, 'css' => 'center'),
'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 500),
'date_valid' => array('type' => 'datetime', 'label' => 'DateValidation', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 502),
'tms' => array('type' => 'timestamp', 'label' => 'Tms', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 505),
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index a7970a3fdbc..23f04e81c92 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -874,7 +874,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 93074f14549..4273d0cf2b0 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -864,7 +864,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/hrm/evaluation_list.php b/htdocs/hrm/evaluation_list.php
index 1f2a72f3416..9f837d65270 100644
--- a/htdocs/hrm/evaluation_list.php
+++ b/htdocs/hrm/evaluation_list.php
@@ -540,7 +540,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/hrm/job_list.php b/htdocs/hrm/job_list.php
index aa044866ebe..bc1128a2aee 100644
--- a/htdocs/hrm/job_list.php
+++ b/htdocs/hrm/job_list.php
@@ -518,7 +518,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/hrm/position_list.php b/htdocs/hrm/position_list.php
index b0730053a67..da105fc65e2 100644
--- a/htdocs/hrm/position_list.php
+++ b/htdocs/hrm/position_list.php
@@ -529,7 +529,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/hrm/skill_list.php b/htdocs/hrm/skill_list.php
index c843589a6f1..8b0cfe7925f 100644
--- a/htdocs/hrm/skill_list.php
+++ b/htdocs/hrm/skill_list.php
@@ -529,7 +529,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/intracommreport/list.php b/htdocs/intracommreport/list.php
index e89b24c3e3f..1dae2ed89e3 100644
--- a/htdocs/intracommreport/list.php
+++ b/htdocs/intracommreport/list.php
@@ -607,7 +607,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php
index 64780f1ac8e..172eca2a43c 100644
--- a/htdocs/knowledgemanagement/knowledgerecord_list.php
+++ b/htdocs/knowledgemanagement/knowledgerecord_list.php
@@ -571,7 +571,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index a91efb581b6..6b29d46a669 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -637,7 +637,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php
index 01a579dc849..e0cdd6df429 100644
--- a/htdocs/mrp/mo_list.php
+++ b/htdocs/mrp/mo_list.php
@@ -524,7 +524,7 @@ foreach ($object->fields as $key => $val) {
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1);
} elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
- print '';
+ print '';
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
print '';
print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php
index 5d4ac440cf6..a409b78623f 100644
--- a/htdocs/partnership/partnership_list.php
+++ b/htdocs/partnership/partnership_list.php
@@ -795,7 +795,7 @@ foreach ($all_fields_list as $key => $val) {
} elseif ($key == 'country') {
print $form->select_country(in_array($key, $search) ? $search[$key] : 0, 'search_country', '', 0, 'minwidth100imp maxwidth100');
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php
index 1bccc2290cf..906352aaea7 100644
--- a/htdocs/product/inventory/list.php
+++ b/htdocs/product/inventory/list.php
@@ -557,7 +557,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 4c667f9b5ec..7ca83b4885f 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -574,7 +574,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index 45d9f8d8986..1294c4f588c 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -519,7 +519,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_list.php b/htdocs/product/stock/stocktransfer/stocktransfer_list.php
index a340b3de4b2..3967095fa20 100644
--- a/htdocs/product/stock/stocktransfer/stocktransfer_list.php
+++ b/htdocs/product/stock/stocktransfer/stocktransfer_list.php
@@ -517,7 +517,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php
index 26f5ecc6ccc..f9788aa911e 100644
--- a/htdocs/recruitment/recruitmentcandidature_list.php
+++ b/htdocs/recruitment/recruitmentcandidature_list.php
@@ -655,7 +655,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php
index 421f83261ca..c7dbe68269d 100644
--- a/htdocs/recruitment/recruitmentjobposition_list.php
+++ b/htdocs/recruitment/recruitmentjobposition_list.php
@@ -493,7 +493,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php
index 3c4f6de784b..43bebc1d02d 100644
--- a/htdocs/societe/website.php
+++ b/htdocs/societe/website.php
@@ -536,7 +536,7 @@ foreach ($objectwebsiteaccount->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php
index 482272fba78..97de659fd18 100644
--- a/htdocs/variants/list.php
+++ b/htdocs/variants/list.php
@@ -565,7 +565,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
@@ -580,13 +580,13 @@ print $hookmanager->resPrint;
$key = 'nb_of_values';
if (!empty($arrayfields[$key]['checked'])) {
print '
';
- print '';
+ print '';
print ' | ';
}
$key = 'nb_products';
if (!empty($arrayfields[$key]['checked'])) {
print '';
- print '';
+ print '';
print ' | ';
}
// Action column
diff --git a/htdocs/webhook/target_list.php b/htdocs/webhook/target_list.php
index 3bb0c2ab9ec..3172b7844fa 100644
--- a/htdocs/webhook/target_list.php
+++ b/htdocs/webhook/target_list.php
@@ -559,7 +559,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}
diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php
index bc17f9dcdf6..097deeea801 100644
--- a/htdocs/workstation/workstation_list.php
+++ b/htdocs/workstation/workstation_list.php
@@ -542,7 +542,7 @@ foreach ($object->fields as $key => $val) {
$formadmin = new FormAdmin($db);
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
} else {
- print '';
+ print '';
}
print '';
}