Commit a76bf962 authored by Michal Čihař's avatar Michal Čihař

Use multipane selector for subscriptions instead of dozen of checkboxes

Fixes #1001
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent c14196b5
...@@ -190,7 +190,7 @@ class SubscriptionForm(forms.ModelForm): ...@@ -190,7 +190,7 @@ class SubscriptionForm(forms.ModelForm):
'subscriptions', 'subscriptions',
) )
widgets = { widgets = {
'subscriptions': forms.CheckboxSelectMultiple 'subscriptions': forms.SelectMultiple
} }
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
...@@ -200,10 +200,6 @@ class SubscriptionForm(forms.ModelForm): ...@@ -200,10 +200,6 @@ class SubscriptionForm(forms.ModelForm):
self.fields['subscriptions'].help_text = None self.fields['subscriptions'].help_text = None
self.fields['subscriptions'].required = False self.fields['subscriptions'].required = False
self.fields['subscriptions'].queryset = Project.objects.all_acl(user) self.fields['subscriptions'].queryset = Project.objects.all_acl(user)
self.helper = FormHelper(self)
self.helper.field_class = 'subscription-checkboxes'
self.helper.field_template = \
'bootstrap3/layout/checkboxselectmultiple.html'
class SubscriptionSettingsForm(forms.ModelForm): class SubscriptionSettingsForm(forms.ModelForm):
......
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