disable user-password popup for plaintext passwords (no need) and set disabled, if password field is readonly from server-side

This commit is contained in:
ralf 2023-11-02 17:16:16 +02:00
parent a7396cab69
commit a9aefd6a32

View File

@ -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) =>