web/admin: fix email being required

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-05 14:43:16 +02:00
parent e52390aa28
commit 90775d5122
2 changed files with 2 additions and 8 deletions

View File

@ -72,16 +72,11 @@ export class UserDetailsPage extends LitElement {
/> />
<p class="pf-c-form__helper-text">${t`User's display name.`}</p> <p class="pf-c-form__helper-text">${t`User's display name.`}</p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-form-element-horizontal label=${t`Email`} name="email">
label=${t`Email`}
?required=${true}
name="email"
>
<input <input
type="email" type="email"
value="${ifDefined(this.user?.email)}" value="${ifDefined(this.user?.email)}"
class="pf-c-form-control" class="pf-c-form-control"
required
/> />
</ak-form-element-horizontal> </ak-form-element-horizontal>

View File

@ -61,13 +61,12 @@ export class UserForm extends ModelForm<User, number> {
/> />
<p class="pf-c-form__helper-text">${t`User's display name.`}</p> <p class="pf-c-form__helper-text">${t`User's display name.`}</p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal label=${t`Email`} ?required=${true} name="email"> <ak-form-element-horizontal label=${t`Email`} name="email">
<input <input
type="email" type="email"
autocomplete="off" autocomplete="off"
value="${ifDefined(this.instance?.email)}" value="${ifDefined(this.instance?.email)}"
class="pf-c-form-control" class="pf-c-form-control"
required
/> />
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal name="isActive"> <ak-form-element-horizontal name="isActive">