Commit 70e408f1 authored by Michal Čihař's avatar Michal Čihař

Add required class to elements

parent 30047d39
......@@ -214,7 +214,7 @@ class RegistrationForm(RegistrationFormUniqueEmail):
username = forms.RegexField(
regex=r'^[\w.@+-]+$',
max_length=30,
widget=forms.TextInput(attrs=attrs_dict),
widget=forms.TextInput(attrs={'class': 'required'}),
label=_("Username"),
error_messages={
'invalid': _(
......@@ -223,8 +223,14 @@ class RegistrationForm(RegistrationFormUniqueEmail):
)
}
)
first_name = forms.CharField(label=_('First name'))
last_name = forms.CharField(label=_('Last name'))
first_name = forms.CharField(
widget=forms.TextInput(attrs={'class': 'required'}),
label=_('First name')
)
last_name = forms.CharField(
widget=forms.TextInput(attrs={'class': 'required'}),
label=_('Last name')
)
content = forms.CharField(required=False)
def __init__(self, *args, **kwargs):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment