mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Add "form-control" class to some form tags
This commit is contained in:
@@ -28,7 +28,8 @@ class DomainFormGeneral(forms.ModelForm, DynamicForm):
|
||||
help_text=ugettext_lazy(
|
||||
"Alias(es) of this domain. Indicate only one name per input, "
|
||||
"press ENTER to add a new input."
|
||||
)
|
||||
),
|
||||
widget=forms.TextInput(attrs={"class": "col-md-1 form-control"})
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
||||
@@ -18,7 +18,7 @@ class ExportDataForm(forms.Form):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ExportDataForm, self).__init__(*args, **kwargs)
|
||||
self.fields["sepchar"].widget.attrs = {"class": "span1"}
|
||||
self.fields["sepchar"].widget.attrs = {"class": "col-md-1 form-control"}
|
||||
|
||||
def clean_sepchar(self):
|
||||
if self.cleaned_data["sepchar"] == "":
|
||||
|
||||
@@ -17,7 +17,7 @@ class ImportDataForm(forms.Form):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ImportDataForm, self).__init__(*args, **kwargs)
|
||||
self.fields["sepchar"].widget.attrs = {"class": "span1"}
|
||||
self.fields["sepchar"].widget.attrs = {"class": "col-md-1 form-control"}
|
||||
|
||||
def clean_sepchar(self):
|
||||
if self.cleaned_data["sepchar"] == "":
|
||||
|
||||
@@ -11,7 +11,7 @@ class ARmessageForm(forms.ModelForm):
|
||||
required=False,
|
||||
help_text=ugettext_lazy("Activate your auto reply from this date"),
|
||||
widget=forms.TextInput(
|
||||
attrs={'class': 'datefield', 'readonly': 'readonly'}
|
||||
attrs={'class': 'datefield form-control', 'readonly': 'readonly'}
|
||||
)
|
||||
)
|
||||
untildate = forms.DateTimeField(
|
||||
@@ -19,7 +19,7 @@ class ARmessageForm(forms.ModelForm):
|
||||
required=False,
|
||||
help_text=ugettext_lazy("Activate your auto reply until this date"),
|
||||
widget=forms.TextInput(
|
||||
attrs={'class': 'datefield', 'readonly': 'readonly'}
|
||||
attrs={'class': 'datefield form-control', 'readonly': 'readonly'}
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -14,14 +14,17 @@ class RelayDomainFormGeneral(forms.ModelForm, DynamicForm):
|
||||
help_text=ugettext_lazy(
|
||||
"Alias(es) of this relay domain. Indicate only one name per input"
|
||||
", press ENTER to add a new input."
|
||||
)
|
||||
),
|
||||
widget=forms.TextInput(attrs={'class': 'form-control'})
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = RelayDomain
|
||||
exclude = ['dates']
|
||||
widgets = {
|
||||
'service': forms.Select(attrs={'class': 'span2'})
|
||||
'service': forms.Select(attrs={'class': 'col-mg-2 form-control'}),
|
||||
'target_host': forms.TextInput(attrs={'class': 'form-control'}),
|
||||
'name': forms.TextInput(attrs={'class': 'form-control'})
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -9,7 +9,9 @@ from modoboa.extensions.admin.templatetags.admin_tags import gender
|
||||
|
||||
|
||||
class FiltersSetForm(forms.Form):
|
||||
name = forms.CharField(widget=forms.TextInput(attrs={"class": "form-control"}))
|
||||
name = forms.CharField(
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
active = forms.BooleanField(
|
||||
label=gender("Active", "m"), required=False,
|
||||
initial=False,
|
||||
|
||||
@@ -55,7 +55,7 @@ class ParametersForm(AdminParametersForm):
|
||||
("ssl", "SSL/TLS")],
|
||||
initial="none",
|
||||
help_text=_("Use a secured connection to access SMTP server"),
|
||||
widget=InlineRadioSelect(attrs={"type": "checkbox"})
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
smtp_port = forms.IntegerField(
|
||||
|
||||
Reference in New Issue
Block a user