From d5f53af8b928181075074e13b2557a8ceea2279a Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 6 Dec 2021 16:27:22 -0700 Subject: [PATCH] Fix missing buttons in contact edit --- addressbook/js/app.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index cc6de117c3..f826c4cf94 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -743,8 +743,9 @@ class AddressbookApp extends EgwApp if(!selectbox) return; var custom_field_name = selectbox.id.replace("countrycode", "countryname"); var custom_field = document.getElementById(custom_field_name); + let display = "inline"; if(custom_field && selectbox.value == "-custom-") { - custom_field.style.display = "inline"; + display = "inline"; } else if (custom_field) { @@ -754,15 +755,20 @@ class AddressbookApp extends EgwApp // Chosen needs this to update jQuery(selectbox).trigger("liszt:updated"); - custom_field.style.display = "inline"; + display = "inline"; } else { - custom_field.style.display = "none"; + display = "none"; } } + if(custom_field.attributeStyleMap) + { + custom_field.attributeStyleMap.set("display", display); + } + var region = this.et2.getWidgetById(selectbox.name.replace('countrycode', 'region')); - if (region) + if(region) { region.set_country_code(selectbox.value); }