From 8c5575e5daff0f12ee6a3e7ddd4b1fc95fe7d97d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 17 May 2017 11:15:07 +0200 Subject: Operation wizard: collaborators in a specific panel (refs #3595) --- ishtar_common/widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index b0f28a6cf..12db821c5 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -82,12 +82,16 @@ class Select2Multiple(forms.SelectMultiple): self.remote = None if not choices and not self.remote and self.model: choices = self.get_choices() + new_attrs = self.attrs.copy() + new_attrs.update(attrs) + attrs = new_attrs klass = attrs and attrs.get('class') or '' klass += ' ' if klass else '' + 'js-select2' if not attrs: attrs = {} attrs['class'] = klass - attrs['style'] = "width: 370px" + if 'style' not in attrs: + attrs['style'] = "width: 370px" options = "" if self.remote: options = """{ -- cgit v1.2.3