Merge pull request #1393 from emanuelschuetze/bsmselect-updated

Reduce the usage of bsmselect jquery plugin.
This commit is contained in:
Norman Jäckel 2015-01-09 22:17:00 +01:00
commit adefb49457
2 changed files with 5 additions and 4 deletions

View File

@ -136,7 +136,7 @@
<script type="text/javascript" src="{% static 'js/jquery/jquery.bsmselect.js' %}"></script>
<script type="text/javascript">
// use jquery-bsmselect for all <select multiple> form elements
$("select[multiple]").bsmSelect({
$("select[multiple]:not(.dont_use_bsmselect)").bsmSelect({
removeLabel: '<sup><b>X</b></sup>',
containerClass: 'bsmContainer',
listClass: 'bsmList-custom',

View File

@ -84,10 +84,11 @@ class UserUpdateForm(UserCreateForm):
class GroupForm(forms.ModelForm, CssClassMixin):
permissions = LocalizedModelMultipleChoiceField(
queryset=Permission.objects.all(), label=ugettext_lazy('Permissions'),
required=False)
queryset=Permission.objects.all(), label=ugettext_lazy('Permissions'), required=False,
widget=forms.SelectMultiple(attrs={'class': 'dont_use_bsmselect'}))
users = forms.ModelMultipleChoiceField(
queryset=User.objects.all(), label=ugettext_lazy('Participants'), required=False)
queryset=User.objects.all(), label=ugettext_lazy('Participants'), required=False,
widget=forms.SelectMultiple(attrs={'class': 'dont_use_bsmselect'}))
class Meta:
model = Group