From 976cbd5f83383c344074a23cb8bf279330450867 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 30 Sep 2017 18:52:33 +0200 Subject: [PATCH] Fix javascript error and input field for password extrafield in list --- htdocs/core/class/extrafields.class.php | 3 ++- htdocs/core/js/lib_head.js.php | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 4c7fb824559..bae3020385f 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1323,7 +1323,8 @@ class ExtraFields } elseif ($type == 'password') { - $out=''; + // If prefix is 'search_', field is used as a filter, we use a common text field. + $out=''; } if (!empty($hidden)) { $out=''; diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 7ed49d004d2..9f8e64a7847 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -506,26 +506,26 @@ function getDateFromFormat(val,format) if (substr == "MM" ||substr == "M") { month=getIntegerInString(val,d,1,2); - d -= 2- month.length; + if (month) d -= 2- month.length; } if (substr == "dd") { day=getIntegerInString(val,d,1,2); - d -= 2- day.length; + if (day) d -= 2- day.length; } if (substr == "HH" ||substr == "hh" ) { hour=getIntegerInString(val,d,1,2); - d -= 2- hour.length; + if (dhouray) d -= 2- hour.length; } if (substr == "mm"){ minute=getIntegerInString(val,d,1,2); - d -= 2- minute.length; + if (minute) d -= 2- minute.length; } if (substr == "ss") { seconde=getIntegerInString(val,d,1,2); - d -= 2- seconde.length; + if (seconde) d -= 2- seconde.length; } i+=substr.length;