From 2da8fb75a8da2e65ce3b95214ca6a5f1a7fc2f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Lukas?= Date: Thu, 12 Nov 2020 15:59:42 +0100 Subject: [PATCH 1/2] Fix #15371 Extrafields from type "select" depending on other fields not working in Safari & jquery select2 #15371 --- htdocs/core/class/commonobject.class.php | 55 +++++++++++++----------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8518d232115..d8b5a9eff7a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6976,34 +6976,37 @@ abstract class CommonObject if (!empty($conf->use_javascript_ajax)) { $out .= ' '."\n"; } From 5498800ad607a162d8c15476a8032622a2ee6f32 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Nov 2020 10:02:34 +0100 Subject: [PATCH 2/2] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d8b5a9eff7a..221c69b659a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6995,12 +6995,12 @@ abstract class CommonObject jQuery("select option[parent]").parent().each(function() { var orig_select = {}; var child_list = $(this).attr("name"); - orig_select [child_list] = $(this).clone(); + orig_select[child_list] = $(this).clone(); var parent = $(this).find("option[parent]:first").attr("parent"); var infos = parent.split(":"); var parent_list = infos[0]; $("select[name=\""+parent_list+"\"]").change(function() { - showOptions(child_list, parent_list, orig_select [child_list]); + showOptions(child_list, parent_list, orig_select[child_list]); }); }); }