web/user: use ak form element for webauthn device

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-29 22:31:12 +02:00
parent 3945dc9f3f
commit 7a93b9e565
1 changed files with 8 additions and 6 deletions

View File

@ -11,6 +11,8 @@ import "../../../elements/buttons/SpinnerButton";
import "../../../elements/forms/DeleteForm"; import "../../../elements/forms/DeleteForm";
import "../../../elements/forms/Form"; import "../../../elements/forms/Form";
import "../../../elements/forms/ModalForm"; import "../../../elements/forms/ModalForm";
import "../../../elements/forms/HorizontalFormElement";
import { ifDefined } from "lit-html/directives/if-defined";
@customElement("ak-user-settings-authenticator-webauthn") @customElement("ak-user-settings-authenticator-webauthn")
export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings { export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings {
@ -52,12 +54,12 @@ export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings {
}); });
}}> }}>
<form class="pf-c-form pf-m-horizontal"> <form class="pf-c-form pf-m-horizontal">
<paper-input <ak-form-element-horizontal
name="name" label=${gettext("Device name")}
?alwaysFloatLabel=${true} ?required=${true}
label="${gettext("Device name")}" name="name">
value=${device.name}> <input type="text" value="${ifDefined(device.name)}" class="pf-c-form-control" required>
</paper-input> </ak-form-element-horizontal>
</form> </form>
</ak-form> </ak-form>
<button slot="trigger" class="pf-c-button pf-m-primary"> <button slot="trigger" class="pf-c-button pf-m-primary">