mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Add "checkbox" type or "form-group" to some choicefield
This commit is contained in:
@@ -41,7 +41,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
('ldap', "LDAP")],
|
||||
initial="local",
|
||||
help_text=ugettext_lazy("The backend used for authentication"),
|
||||
widget=InlineRadioSelect(attrs={"class": "form-control"})
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
password_scheme = forms.ChoiceField(
|
||||
@@ -54,7 +54,8 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
("crypt", ugettext_lazy("crypt (weak)")),
|
||||
("plain", ugettext_lazy("plain (weak)"))],
|
||||
initial="sha512crypt",
|
||||
help_text=ugettext_lazy("Scheme used to crypt mailbox passwords")
|
||||
help_text=ugettext_lazy("Scheme used to crypt mailbox passwords"),
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
rounds_number = forms.IntegerField(
|
||||
@@ -99,7 +100,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
('directbind', ugettext_lazy("Direct bind"))],
|
||||
initial='searchbind',
|
||||
help_text=ugettext_lazy("Choose the authentication method to use"),
|
||||
widget=InlineRadioSelect(attrs={"class": "form-control"})
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
ldap_bind_dn = forms.CharField(
|
||||
@@ -187,7 +188,8 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
label=ugettext_lazy("Default top redirection"),
|
||||
choices=[],
|
||||
initial="user",
|
||||
help_text=ugettext_lazy("The default redirection used when no application is specified")
|
||||
help_text=ugettext_lazy("The default redirection used when no application is specified"),
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
# Visibility rules
|
||||
@@ -324,5 +326,6 @@ class UserSettings(parameters.UserParametersForm):
|
||||
("fr", "français"), ("it", "italiano"),
|
||||
("nl", "nederlands"), ("pt", "português"),
|
||||
("ru", "русский"), ("sv", "svenska")],
|
||||
help_text=ugettext_lazy("Prefered language to display pages")
|
||||
help_text=ugettext_lazy("Prefered language to display pages"),
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
@@ -25,7 +25,8 @@ class AccountFormGeneral(forms.ModelForm):
|
||||
role = forms.ChoiceField(
|
||||
label=ugettext_lazy("Role"),
|
||||
choices=[('', ugettext_lazy("Choose"))],
|
||||
help_text=ugettext_lazy("What level of permission this user will have")
|
||||
help_text=ugettext_lazy("What level of permission this user will have"),
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
password1 = forms.CharField(
|
||||
label=ugettext_lazy("Password"), widget=forms.PasswordInput
|
||||
|
||||
@@ -29,7 +29,7 @@ class ParametersForm(AdminParametersForm):
|
||||
choices=[("inet", "inet"), ("unix", "unix")],
|
||||
initial="unix",
|
||||
help_text=_("Mode used to access the PDP server"),
|
||||
widget=InlineRadioSelect
|
||||
widget=InlineRadioSelect(attrs={"type": "checkbox"})
|
||||
)
|
||||
|
||||
am_pdp_host = forms.CharField(
|
||||
|
||||
@@ -40,7 +40,8 @@ class ParametersForm(AdminParametersForm):
|
||||
label=_("Authentication mechanism"),
|
||||
choices=supported_auth_mechs(),
|
||||
initial="auto",
|
||||
help_text=_("Prefered authentication mechanism")
|
||||
help_text=_("Prefered authentication mechanism"),
|
||||
widget=forms.Select(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +55,7 @@ class UserSettings(UserParametersForm):
|
||||
label=_("Editor mode"),
|
||||
choices=[("raw", "raw"), ("gui", "simplified")],
|
||||
help_text=_("Select the mode you want the editor to work in"),
|
||||
widget=InlineRadioSelect
|
||||
widget=InlineRadioSelect(attrs={"type": "checkbox"})
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -63,7 +63,7 @@ class FilterForm(forms.Form):
|
||||
("anyof", _("Any of the following")),
|
||||
("all", _("All messages"))],
|
||||
initial="anyof",
|
||||
widget=CustomRadioSelect(attrs={"class": "radio inline"})
|
||||
widget=CustomRadioSelect(attrs={"class": "inline", "type": "checkbox"})
|
||||
)
|
||||
|
||||
self.header_operators = [
|
||||
|
||||
@@ -51,7 +51,7 @@ class ParametersForm(AdminParametersForm):
|
||||
("ssl", "SSL/TLS")],
|
||||
initial="none",
|
||||
help_text=_("Use a secured connection to access SMTP server"),
|
||||
widget=InlineRadioSelect
|
||||
widget=InlineRadioSelect(attrs={"type": "checkbox"})
|
||||
)
|
||||
|
||||
smtp_port = forms.IntegerField(
|
||||
@@ -77,7 +77,7 @@ class UserSettings(UserParametersForm):
|
||||
label=_("Default message display mode"),
|
||||
choices=[("html", "html"), ("plain", "text")],
|
||||
help_text=_("The default mode used when displaying a message"),
|
||||
widget=InlineRadioSelect
|
||||
widget=InlineRadioSelect(attrs={"type": "checkbox"})
|
||||
)
|
||||
|
||||
enable_links = YesNoField(
|
||||
@@ -131,7 +131,7 @@ class UserSettings(UserParametersForm):
|
||||
label=_("Default editor"),
|
||||
choices=[("html", "html"), ("plain", "text")],
|
||||
help_text=_("The default editor to use when composing a message"),
|
||||
widget=InlineRadioSelect
|
||||
widget=InlineRadioSelect(attrs={"type": "checkbox"})
|
||||
)
|
||||
|
||||
signature = forms.CharField(
|
||||
|
||||
Reference in New Issue
Block a user