mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Fix up password customfield
- passwd->et2-password custom field type - passwordToggle attribute (changed name, icon didn't change)
This commit is contained in:
parent
b92d45c44a
commit
afdca98629
@ -68,7 +68,7 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
|
||||
if(attrs.viewable)
|
||||
{
|
||||
attrs['toggle-password'] = true;
|
||||
attrs['passwordToggle'] = true;
|
||||
}
|
||||
|
||||
super.transformAttributes(attrs);
|
||||
@ -151,6 +151,7 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
|
||||
if (!this.visible || !this.encrypted)
|
||||
{
|
||||
this.type = this.visible ? 'text' : 'password';
|
||||
return;
|
||||
}
|
||||
|
||||
@ -295,11 +296,11 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
part="password-toggle-button"
|
||||
class="input__password-toggle"
|
||||
type="button"
|
||||
aria-label=${this.localize.term(this.passwordVisible ? 'hidePassword' : 'showPassword')}
|
||||
aria-label=${this.localize.term(this.isPasswordVisible ? 'hidePassword' : 'showPassword')}
|
||||
@click=${this.handlePasswordToggle}
|
||||
tabindex="-1"
|
||||
>
|
||||
${this.passwordVisible
|
||||
${this.isPasswordVisible
|
||||
? html`
|
||||
<slot name="show-password-icon">
|
||||
<sl-icon name="eye-slash" library="system"></sl-icon>
|
||||
@ -335,7 +336,7 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
{
|
||||
if(!this.readonly)
|
||||
{
|
||||
this.shadowRoot.querySelector("input[type='password']").removeAttribute("readonly");
|
||||
this.shadowRoot.querySelector("input").removeAttribute("readonly");
|
||||
}
|
||||
super.handleFocus(e);
|
||||
}
|
||||
|
@ -563,6 +563,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
||||
{
|
||||
// No label on the widget itself
|
||||
delete (attrs.label);
|
||||
attrs.type = "password";
|
||||
let defaults = {
|
||||
viewable:true,
|
||||
plaintext: false,
|
||||
|
Loading…
Reference in New Issue
Block a user