Skip to content

Commit

Permalink
changed password fields to be ha-auth-textfields to make detection of…
Browse files Browse the repository at this point in the history
… autofill in Safari work
  • Loading branch information
avdbrink authored Jan 3, 2024
1 parent 7a6fc57 commit 8d6db59
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/panels/config/users/dialog-add-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { ValueChangedEvent, HomeAssistant } from "../../../types";
import { haStyleDialog } from "../../../resources/styles";
import { AddUserDialogParams } from "./show-dialog-add-user";
import "../../../components/ha-textfield";
import "../../../auth/ha-auth-textfield";
import type { HaTextField } from "../../../components/ha-textfield";

@customElement("dialog-add-user")
Expand Down Expand Up @@ -128,34 +129,36 @@ export class DialogAddUser extends LitElement {
dialogInitialFocus
></ha-textfield>
<ha-textfield
<ha-auth-textfield
.label=${this.hass.localize(
"ui.panel.config.users.add_user.password"
)}
style="display: block"
type="password"
name="password"
.value=${this._password}
required
@input=${this._handleValueChanged}
.validationMessage=${this.hass.localize("ui.common.error_required")}
></ha-textfield>
></ha-auth-textfield>
<ha-textfield
<ha-auth-textfield
label=${this.hass.localize(
"ui.panel.config.users.add_user.password_confirm"
)}
name="passwordConfirm"
.value=${this._passwordConfirm}
@input=${this._handleValueChanged}
required
style="display: block"
type="password"
.invalid=${this._password !== "" &&
this._passwordConfirm !== "" &&
this._passwordConfirm !== this._password}
.validationMessage=${this.hass.localize(
"ui.panel.config.users.add_user.password_not_match"
)}
></ha-textfield>
></ha-auth-textfield>
<div class="row">
<ha-formfield
.label=${this.hass.localize(
Expand Down

0 comments on commit 8d6db59

Please sign in to comment.