diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 22a2c53e1c2..95be6cf97fa 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -8760,9 +8760,10 @@ class Form
-
-
- ' . $listoffieldsforselection . '
+
@@ -8785,6 +8786,12 @@ class Form
// Now, we submit page
//$(this).parents(\'form:first\').submit();
});
+ $("input.inputsearch_dropdownselectedfields").on("keyup", function() {
+ var value = $(this).val().toLowerCase();
+ $(\'.multiselectcheckbox'.$htmlname.' li > label\').filter(function() {
+ $(this).parent().toggle($(this).text().toLowerCase().indexOf(value) > -1)
+ });
+ });
});
diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php
index fb6f4597c0a..ae0de6ad0cb 100644
--- a/htdocs/core/js/lib_foot.js.php
+++ b/htdocs/core/js/lib_foot.js.php
@@ -153,6 +153,7 @@ if (!defined('JS_JQUERY_DISABLE_DROPDOWN')) {
// Click onto the link "link to" or "hamburger", toggle dropdown
$(document).on(\'click\', \'.dropdown dt a\', function () {
console.log("toggle dropdown dt a");
+ setTimeout(() => { $(\'.inputsearch_dropdownselectedfields\').focus(); }, 200);
//$(this).parent().parent().find(\'dd ul\').slideToggle(\'fast\');
$(".ulselectedfields").removeClass("open");
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 0005a9fd881..293e0575653 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -1814,7 +1814,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print '| ';
$durationtouse = (GETPOST('timespent_duration') ? GETPOST('timespent_duration') : '');
if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin')) {
- $durationtouse = (GETPOST('timespent_durationhour') * 3600 + GETPOST('timespent_durationmin') * 60);
+ $durationtouse = ((int) GETPOST('timespent_durationhour') * 3600 + (int) GETPOST('timespent_durationmin') * 60);
}
print $form->select_duration('timespent_duration', $durationtouse, 0, 'text');
print ' | ';