Etemplate: Password suggest now works if started disabled then enabled via JS

This commit is contained in:
nathangray 2020-07-30 13:50:12 -06:00
parent 5379a0c924
commit 88b7bccdb9
2 changed files with 9 additions and 0 deletions

View File

@ -152,6 +152,10 @@ var et2_password = /** @class */ (function (_super) {
statustext: this.egw().lang("Suggest password") statustext: this.egw().lang("Suggest password")
}; };
this.suggest_button = et2_core_widget_1.et2_createWidget("button", attrs, this); 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) { if (length) {
jQuery('.generate_password', this.wrapper).show(); jQuery('.generate_password', this.wrapper).show();

View File

@ -199,6 +199,11 @@ export class et2_password extends et2_textbox
statustext: this.egw().lang("Suggest password") statustext: this.egw().lang("Suggest password")
}; };
this.suggest_button = <et2_button> et2_createWidget("button", attrs, this); this.suggest_button = <et2_button> et2_createWidget("button", attrs, this);
if(this.parentNode)
{
// Turned on after initial load, need to run loadingFinished()
this.suggest_button.loadingFinished();
}
} }
if(length) if(length)
{ {