From 88b7bccdb993f2140b229721c4400e2e72f33261 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 30 Jul 2020 13:50:12 -0600 Subject: [PATCH] Etemplate: Password suggest now works if started disabled then enabled via JS --- api/js/etemplate/et2_widget_password.js | 4 ++++ api/js/etemplate/et2_widget_password.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/api/js/etemplate/et2_widget_password.js b/api/js/etemplate/et2_widget_password.js index ac541259f7..c5a8a80236 100644 --- a/api/js/etemplate/et2_widget_password.js +++ b/api/js/etemplate/et2_widget_password.js @@ -152,6 +152,10 @@ var et2_password = /** @class */ (function (_super) { statustext: this.egw().lang("Suggest password") }; this.suggest_button = et2_core_widget_1.et2_createWidget("button", attrs, this); + if (this.parentNode) { + // Turned on after initial load, need to run loadingFinished() + this.suggest_button.loadingFinished(); + } } if (length) { jQuery('.generate_password', this.wrapper).show(); diff --git a/api/js/etemplate/et2_widget_password.ts b/api/js/etemplate/et2_widget_password.ts index 7557a987a9..3b2dd8c3c7 100644 --- a/api/js/etemplate/et2_widget_password.ts +++ b/api/js/etemplate/et2_widget_password.ts @@ -199,6 +199,11 @@ export class et2_password extends et2_textbox statustext: this.egw().lang("Suggest password") }; this.suggest_button = et2_createWidget("button", attrs, this); + if(this.parentNode) + { + // Turned on after initial load, need to run loadingFinished() + this.suggest_button.loadingFinished(); + } } if(length) {