From a9aefd6a3205529de9252002cc72688727995687 Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 2 Nov 2023 17:16:16 +0200 Subject: [PATCH] disable user-password popup for plaintext passwords (no need) and set disabled, if password field is readonly from server-side --- api/js/etemplate/Et2Textbox/Et2Password.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Textbox/Et2Password.ts b/api/js/etemplate/Et2Textbox/Et2Password.ts index 86feddd275..1dd5004474 100644 --- a/api/js/etemplate/Et2Textbox/Et2Password.ts +++ b/api/js/etemplate/Et2Textbox/Et2Password.ts @@ -93,7 +93,7 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox) if (this._invokerNode) { const invokerNode = /** @type {HTMLElement & {disabled: boolean}} */ (this._invokerNode); - invokerNode.disabled = this.disabled; + invokerNode.disabled = this.disabled || this.readonly; } } @@ -164,6 +164,8 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox) return; } + if (this.plaintext) return; // no need to query user-password, if the password is plaintext + // Need username & password to decrypt Et2Dialog.show_prompt( (button, user_password) =>