Add autocomplete attributes to profile fields
This commit is contained in:
parent
b8b3d73e95
commit
4f13fa58dc
|
@ -29,22 +29,34 @@ func newProfileForm(ctx context.Context, conn *Conn, locale *Locale) *profileFor
|
||||||
Label: pgettext("input", "User name", locale),
|
Label: pgettext("input", "User name", locale),
|
||||||
Type: "text",
|
Type: "text",
|
||||||
Required: true,
|
Required: true,
|
||||||
|
Attributes: []*Attribute{
|
||||||
|
{"autocomplete", "name"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Email: &InputField{
|
Email: &InputField{
|
||||||
Name: "email",
|
Name: "email",
|
||||||
Label: pgettext("input", "Email", locale),
|
Label: pgettext("input", "Email", locale),
|
||||||
Type: "email",
|
Type: "email",
|
||||||
Required: true,
|
Required: true,
|
||||||
|
Attributes: []*Attribute{
|
||||||
|
{"autocomplete", "username"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Password: &InputField{
|
Password: &InputField{
|
||||||
Name: "password",
|
Name: "password",
|
||||||
Label: pgettext("input", "Password", locale),
|
Label: pgettext("input", "Password", locale),
|
||||||
Type: "password",
|
Type: "password",
|
||||||
|
Attributes: []*Attribute{
|
||||||
|
{"autocomplete", "new-password"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
PasswordConfirm: &InputField{
|
PasswordConfirm: &InputField{
|
||||||
Name: "password_confirm",
|
Name: "password_confirm",
|
||||||
Label: pgettext("input", "Password Confirmation", locale),
|
Label: pgettext("input", "Password Confirmation", locale),
|
||||||
Type: "password",
|
Type: "password",
|
||||||
|
Attributes: []*Attribute{
|
||||||
|
{"autocomplete", "new-password"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Language: &SelectField{
|
Language: &SelectField{
|
||||||
Name: "language",
|
Name: "language",
|
||||||
|
|
Loading…
Reference in New Issue