Add autocomplete attributes to profile fields

This commit is contained in:
jordi fita mas 2023-02-01 11:37:13 +01:00
parent b8b3d73e95
commit 4f13fa58dc
1 changed files with 12 additions and 0 deletions

View File

@ -29,22 +29,34 @@ func newProfileForm(ctx context.Context, conn *Conn, locale *Locale) *profileFor
Label: pgettext("input", "User name", locale),
Type: "text",
Required: true,
Attributes: []*Attribute{
{"autocomplete", "name"},
},
},
Email: &InputField{
Name: "email",
Label: pgettext("input", "Email", locale),
Type: "email",
Required: true,
Attributes: []*Attribute{
{"autocomplete", "username"},
},
},
Password: &InputField{
Name: "password",
Label: pgettext("input", "Password", locale),
Type: "password",
Attributes: []*Attribute{
{"autocomplete", "new-password"},
},
},
PasswordConfirm: &InputField{
Name: "password_confirm",
Label: pgettext("input", "Password Confirmation", locale),
Type: "password",
Attributes: []*Attribute{
{"autocomplete", "new-password"},
},
},
Language: &SelectField{
Name: "language",