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

This commit is contained in:
Maël Solard
2014-08-07 18:38:42 +02:00
parent 35b830e912
commit 4fa407fc22
10 changed files with 40 additions and 25 deletions
+8 -4
View File
@@ -64,7 +64,8 @@ class GeneralParametersForm(parameters.AdminParametersForm):
help_text=ugettext_lazy(
"Number of rounds to use (only used by sha256crypt and "
"sha512crypt). Must be between 1000 and 999999999, inclusive."
)
),
widget=forms.TextInput(attrs={"class": "form-control"})
)
secret_key = forms.CharField(
@@ -85,7 +86,8 @@ class GeneralParametersForm(parameters.AdminParametersForm):
ldap_server_port = forms.IntegerField(
label=ugettext_lazy("Server port"),
initial=389,
help_text=ugettext_lazy("The TCP port number used by the LDAP server")
help_text=ugettext_lazy("The TCP port number used by the LDAP server"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
ldap_secured = YesNoField(
@@ -175,13 +177,15 @@ class GeneralParametersForm(parameters.AdminParametersForm):
log_maximum_age = forms.IntegerField(
label=ugettext_lazy("Maximum log record age"),
initial=365,
help_text=ugettext_lazy("The maximum age in days of a log record")
help_text=ugettext_lazy("The maximum age in days of a log record"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
items_per_page = forms.IntegerField(
label=ugettext_lazy("Items per page"),
initial=30,
help_text=ugettext_lazy("Number of displayed items per page")
help_text=ugettext_lazy("Number of displayed items per page"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
default_top_redirection = forms.ChoiceField(
+1 -1
View File
@@ -31,7 +31,7 @@ class AdminParametersForm(parameters.AdminParametersForm):
"Default quota (in MB) applied to freshly created domains with no "
"value specified. A value of 0 means no quota."
),
widget=forms.TextInput(attrs={'class': 'span2'})
widget=forms.TextInput(attrs={'class': 'col-md-2 form-control'})
)
auto_account_removal = YesNoField(
+1 -1
View File
@@ -134,7 +134,7 @@ class AccountFormMail(forms.Form, DynamicForm):
"use domain's default one. Leave empty to define an "
"unlimited value (not allowed for domain "
"administrators)."),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
quota_act = forms.BooleanField(required=False)
aliases = forms.EmailField(
+1 -1
View File
@@ -20,7 +20,7 @@ class DomainFormGeneral(forms.ModelForm, DynamicForm):
"Default quota in MB applied to mailboxes. Leave empty to use the "
"default value."
),
widget=forms.TextInput(attrs={"class": "span1"})
widget=forms.TextInput(attrs={"class": "col-md-1 form-control"})
)
aliases = DomainNameField(
label=ugettext_lazy("Alias(es)"),
+8 -4
View File
@@ -13,7 +13,8 @@ class ParametersForm(AdminParametersForm):
max_messages_age = forms.IntegerField(
label=_("Maximum message age"),
initial=14,
help_text=_("Quarantine messages maximum age (in days) before deletion")
help_text=_("Quarantine messages maximum age (in days) before deletion"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
sep1 = SeparatorField(label=_("Messages releasing"))
@@ -41,7 +42,8 @@ class ParametersForm(AdminParametersForm):
am_pdp_port = forms.IntegerField(
label=_("PDP server port"),
initial=9998,
help_text=_("PDP server port (if inet mode)")
help_text=_("PDP server port (if inet mode)"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
am_pdp_socket = forms.CharField(
@@ -53,7 +55,8 @@ class ParametersForm(AdminParametersForm):
check_requests_interval = forms.IntegerField(
label=_("Check requests interval"),
initial=30,
help_text=_("Interval between two release requests checks")
help_text=_("Interval between two release requests checks"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
user_can_release = YesNoField(
@@ -89,5 +92,6 @@ class UserSettings(UserParametersForm):
messages_per_page = forms.IntegerField(
initial=40,
label=_("Number of displayed emails per page"),
help_text=_("Set the maximum number of messages displayed in a page")
help_text=_("Set the maximum number of messages displayed in a page"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
+5 -5
View File
@@ -13,31 +13,31 @@ class ParametersForm(AdminParametersForm):
label=_("Domain admins"),
initial=0,
help_text=_("Maximum number of allowed domain administrators for a new administrator"),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
deflt_domains_limit = forms.IntegerField(
label=_("Domains"),
initial=0,
help_text=_("Maximum number of allowed domains for a new administrator"),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
deflt_domain_aliases_limit = forms.IntegerField(
label=_("Domain aliases"),
initial=0,
help_text=_("Maximum number of allowed domain aliases for a new administrator"),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
deflt_mailboxes_limit = forms.IntegerField(
label=_("Mailboxes"),
initial=0,
help_text=_("Maximum number of allowed mailboxes for a new administrator"),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
deflt_mailbox_aliases_limit = forms.IntegerField(
label=_("Mailbox aliases"),
initial=0,
help_text=_("Maximum number of allowed aliases for a new administrator"),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
def __init__(self, *args, **kwargs):
@@ -13,7 +13,8 @@ class ParametersForm(AdminParametersForm):
autoreplies_timeout = forms.IntegerField(
label=ugettext_lazy("Automatic reply timeout"),
initial=86400,
help_text=ugettext_lazy("Timeout in seconds between two auto-replies to the same recipient")
help_text=ugettext_lazy("Timeout in seconds between two auto-replies to the same recipient"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
default_subject = forms.CharField(
@@ -18,7 +18,7 @@ def extra_parameters(app, level):
help_text=ugettext_lazy(
"Maximum number of allowed relay domains for a new administrator"
),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
),
'deflt_relay_domain_aliases_limit': forms.IntegerField(
label=ugettext_lazy("Relay domain aliases"),
@@ -26,7 +26,7 @@ def extra_parameters(app, level):
help_text=ugettext_lazy(
"Maximum number of allowed relay domain aliases for a new administrator"
),
widget=forms.widgets.TextInput(attrs={"class": "span1"})
widget=forms.widgets.TextInput(attrs={"class": "col-md-1 form-control"})
)
}
@@ -27,7 +27,8 @@ class ParametersForm(AdminParametersForm):
port = forms.IntegerField(
label=_("Server port"),
initial=4190,
help_text=_("Listening port of your MANAGESIEVE server")
help_text=_("Listening port of your MANAGESIEVE server"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
starttls = YesNoField(
+10 -5
View File
@@ -33,7 +33,8 @@ class ParametersForm(AdminParametersForm):
imap_port = forms.IntegerField(
label=_("Server port"),
initial=143,
help_text=_("Listening port of your IMAP server")
help_text=_("Listening port of your IMAP server"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
sep2 = SeparatorField(label=_("SMTP settings"))
@@ -57,7 +58,8 @@ class ParametersForm(AdminParametersForm):
smtp_port = forms.IntegerField(
label=_("Server port"),
initial=25,
help_text=_("Listening port of your SMTP server")
help_text=_("Listening port of your SMTP server"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
smtp_authentication = YesNoField(
@@ -89,19 +91,22 @@ class UserSettings(UserParametersForm):
messages_per_page = forms.IntegerField(
initial=40,
label=_("Number of displayed emails per page"),
help_text=_("Sets the maximum number of messages displayed in a page")
help_text=_("Sets the maximum number of messages displayed in a page"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
refresh_interval = forms.IntegerField(
initial=300,
label=_("Listing refresh rate"),
help_text=_("Automatic folder refresh rate (in seconds)")
help_text=_("Automatic folder refresh rate (in seconds)"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
mboxes_col_width = forms.IntegerField(
initial=200,
label=_("Mailboxes container's width"),
help_text=_("The width of the mailbox list container")
help_text=_("The width of the mailbox list container"),
widget=forms.TextInput(attrs={"class": "form-control"})
)
sep2 = SeparatorField(label=_("Mailboxes"))