Add "form-control" class to each "EmailField"

This commit is contained in:
Maël Solard
2014-08-07 18:38:42 +02:00
parent 093f82c252
commit 3b138f2f4f
3 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -135,7 +135,7 @@ class AccountFormGeneral(forms.ModelForm):
class AccountFormMail(forms.Form, DynamicForm):
email = forms.EmailField(label=ugettext_lazy("E-mail"), required=False)
email = forms.EmailField(label=ugettext_lazy("E-mail"), required=False, widget=forms.TextInput(attrs={"class": "form-control"}))
quota = forms.IntegerField(
label=ugettext_lazy("Quota"),
required=False,
@@ -153,7 +153,8 @@ class AccountFormMail(forms.Form, DynamicForm):
"Alias(es) of this mailbox. Indicate only one address per input, "
"press ENTER to add a new input. Use the '*' character to create "
"a 'catchall' alias (ex: *@domain.tld)."
)
),
widget=forms.TextInput(attrs={"class": "form-control"})
)
def __init__(self, *args, **kwargs):
+4 -2
View File
@@ -17,14 +17,16 @@ class AliasForm(forms.ModelForm, DynamicForm):
help_text=ugettext_lazy(
"The distribution list address. Use the '*' character to create a "
"'catchall' address (ex: *@domain.tld)."
)
),
widget=forms.TextInput(attrs={"class": "form-control"})
)
recipients = forms.EmailField(
label=ugettext_lazy("Recipients"), required=False,
help_text=ugettext_lazy(
"Mailbox(es) this alias will point to. Indicate only one address "
"per input, press ENTER to add a new input."
)
),
widget=forms.TextInput(attrs={"class": "form-control"})
)
class Meta:
+2 -1
View File
@@ -76,7 +76,8 @@ class ParametersForm(AdminParametersForm):
notifications_sender = forms.EmailField(
label=_("Notifications sender"),
initial="notification@modoboa.org",
help_text=_("The e-mail address used to send notitications")
help_text=_("The e-mail address used to send notitications"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
visibility_rules = {