From 6a5d18948989b88d20258c7b3e0ab3e377092b19 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 14 Nov 2022 14:41:08 -0700 Subject: [PATCH] Better fix for Et2SelectState not getting country set --- addressbook/js/app.ts | 2 -- api/js/etemplate/Et2Select/Et2Select.ts | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index 34a55db749..dd000c93d6 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -110,8 +110,6 @@ class AddressbookApp extends EgwApp this.check_value(this.et2.getWidgetById(content.presets_fields),0); } } - this.regionSetCountry(null, this.et2.getWidgetById("adr_one_countrycode")); - this.regionSetCountry(null, this.et2.getWidgetById("adr_two_countrycode")); break; } } diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 7ed6776f51..50a6edae41 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -780,7 +780,7 @@ export class Et2SelectState extends Et2StaticSelectMixin(Et2Select) { return { ...super.properties, - country_code: String, + countryCode: String, } } @@ -788,24 +788,24 @@ export class Et2SelectState extends Et2StaticSelectMixin(Et2Select) { super(); - this.country_code = 'DE'; + this.countryCode = 'DE'; } - get country_code() + get countryCode() { - return this.__country_code; + return this.__countryCode; } - set country_code(code : string) + set countryCode(code : string) { - this.__country_code = code; - this.static_options = so.state(this, {country_code: this.__country_code}); + this.__countryCode = code; + this.static_options = so.state(this, {country_code: code}); this.requestUpdate("select_options"); } set_country_code(code) { - this.country_code = code; + this.countryCode = code; } }