diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 9e54b19db1c..bb482bbf433 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1149,15 +1149,16 @@ class Form
* Return list of types of lines (product or service)
* Example: 0=product, 1=service, 9=other (for external module)
*
- * @param string $selected Preselected type
- * @param string $htmlname Name of field in html form
- * @param int<0,1>|string $showempty Add an empty field
- * @param int $hidetext Do not show label 'Type' before combo box (used only if there is at least 2 choices to select)
- * @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
- * @param string $morecss More css
+ * @param string $selected Preselected type
+ * @param string $htmlname Name of field in html form
+ * @param int<0,1>|string $showempty Add an empty field
+ * @param int $hidetext Do not show label 'Type' before combo box (used only if there is at least 2 choices to select)
+ * @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
+ * @param string $morecss More css
+ * @param int $useajaxcombo 1=Use ajaxcombo
* @return void
*/
- public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0, $morecss = "")
+ public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0, $morecss = "", $useajaxcombo = 1)
{
// phpcs:enable
global $langs;
@@ -1166,11 +1167,11 @@ class Form
if ($forceall == 1 || (empty($forceall) && isModEnabled("product") && isModEnabled("service"))
|| (empty($forceall) && !isModEnabled('product') && !isModEnabled('service'))) {
if (empty($hidetext)) {
- print $langs->trans("Type") . ': ';
+ print $langs->trans("Type").'...';
}
print '';
- print ajax_combobox('select_' . $htmlname);
+
+ if ($useajaxcombo) {
+ print ajax_combobox('select_' . $htmlname);
+ }
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
}
if ((empty($forceall) && !isModEnabled('product') && isModEnabled("service")) || $forceall == 3) {
diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php
index 44cb68bd697..b6809a296a5 100644
--- a/htdocs/core/js/lib_head.js.php
+++ b/htdocs/core/js/lib_head.js.php
@@ -1557,11 +1557,13 @@ if (!getDolGlobalString('MAIN_DISABLE_SELECT2_FOCUS_PROTECTION') && !defined('DI
* TODO: Recheck with the select2 GH issue and remove once this is fixed on their side
*/
$(document).on('select2:open', (e) => {
- console.log("Execute the focus (click on combo or use space when on component");
+ console.log("Execute the focus (click on combo or use space when on component)");
const target = $(e.target);
if (target && target.length) {
let id = target[0].id || target[0].name;
- if (id.substr(-2) == "[]") id = id.substr(0,id.length-2);
+ if (id.substr(-2) == "[]") {
+ id = id.substr(0,id.length-2);
+ }
document.querySelector('input[aria-controls*='+id+']').focus();
}
});
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index be49279b2ef..4cf2258fded 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -204,7 +204,7 @@ if ($nolinesbefore) {
}
}
- // Free line
+ // Select type of free line
$labelforempty = 1;
print '';
// Show radio for the non predefined product
@@ -215,10 +215,8 @@ if ($nolinesbefore) {
print((GETPOST('prod_entry_mode', 'alpha') == 'free' || getDolGlobalString('MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT')) ? ' checked' : '');
print '> ';
// Show type selector
- //print '';
- $labelforempty = $langs->trans("FreeLineOfType");
+ $labelforempty = $langs->trans("FreeLineOfType").'...';
print '';
- //print ' ';
} else {
echo '';
// Show type selector
@@ -228,11 +226,10 @@ if ($nolinesbefore) {
} else {
$labelforempty = $langs->trans("FreeLineOfType");
}
- //print ' ';
}
}
- $form->select_type_of_lines(GETPOSTISSET("type") ? GETPOST("type", 'alpha', 2) : -1, 'type', $labelforempty, 1, $forceall, 'minwidth200');
+ $form->select_type_of_lines(GETPOSTISSET("type") ? GETPOST("type", 'alpha', 2) : -1, 'type', $labelforempty, 1, $forceall, 'minwidth200', 0);
print '';
}
// Predefined product/service
@@ -281,10 +278,10 @@ if ($nolinesbefore) {
if (getDolGlobalString('MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_CUSTOMER_PRODUCTS')) {
?>
';
+//print 'Click';
+
print "\n";
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 16db52a9770..4099d762745 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -798,7 +798,7 @@ Notes=Notes
AddNewLine=Add new line
AddFile=Add file
FreeZone=Free-text product
-FreeLineOfType=Free-text item, type:
+FreeLineOfType=Free-text item, type
CloneMainAttributes=Clone object with its main attributes
ReGeneratePDF=Re-generate PDF
PDFMerge=PDF Merge
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 5db98f3af5c..e6b4e156a26 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -748,8 +748,12 @@ input:-webkit-autofill {
/* CSS for placeholder */
.placeholder { color: #ccc; }
+select.placeholder { color: #ccc; }
::-webkit-input-placeholder { color: #ccc; }
input:-moz-placeholder { color: #ccc; }
+select.placeholder option:not(.opacitymediumbycolor):not(.opacitymedium) {
+ color: var(--colortext);
+}
input[name=price], input[name=weight], input[name=volume], input[name=surface], input[name=sizeheight], input[name=net_measure], select[name=incoterm_id] { margin-right: 6px; }
fieldset {
@@ -766,6 +770,7 @@ input#onlinepaymenturl, input#directdownloadlink {
opacity: 0.7;
}
+
.formconsumeproduce {
background: #f3f3f3;
padding: 20px 0px 0px 0px;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 5d31a78fe22..b333f13f1ca 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -933,11 +933,15 @@ input[type=checkbox], input[type=radio] {
/* CSS for placeholder */
.placeholder { color: #ccc; }
+select.placeholder { color: #ccc; }
::-webkit-input-placeholder { color:#ccc; }
:-moz-placeholder { color:#bbb; } /* firefox 18- */
::-moz-placeholder { color:#bbb; } /* firefox 19+ */
:-ms-input-placeholder { color:#ccc; } /* ie */
input:-moz-placeholder { color:#ccc; }
+select.placeholder option:not(.opacitymediumbycolor):not(.opacitymedium) {
+ color: var(--colortext);
+}
input[name=price], input[name=weight], input[name=volume], input[name=surface], input[name=sizeheight], input[name=net_measure], select[name=incoterm_id] { margin-right: 6px; }
fieldset {
@@ -4490,7 +4494,7 @@ tr.liste_titre_filter td.liste_titre {
padding-top: 4px;
padding-bottom: 3px;
}
-.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
+.liste_titre_create td:not(.linecoldescription), .liste_titre_create th, .liste_titre_create .tagtd
{
border-top-width: 1px;
border-top-color: var(--colortopbordertitle1);
@@ -4512,6 +4516,10 @@ tr#trlinefordates td {
border-top-style: solid;
}
+td.linecoldescription {
+ padding: 6px 10px 6px 12px !important; /* t r b l */
+}
+
table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td {
padding: 8px 8px 8px 10px; /* t r b l */
}