summaryrefslogtreecommitdiff
path: root/ishtar_common/widgets.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-17 11:15:07 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-17 11:15:07 +0200
commit8c5575e5daff0f12ee6a3e7ddd4b1fc95fe7d97d (patch)
tree09c957b3837760d776657df6f517fed7898b6c5c /ishtar_common/widgets.py
parent840c08691a4dcc2684209120242242f695a8aa0e (diff)
downloadIshtar-8c5575e5daff0f12ee6a3e7ddd4b1fc95fe7d97d.tar.bz2
Ishtar-8c5575e5daff0f12ee6a3e7ddd4b1fc95fe7d97d.zip
Operation wizard: collaborators in a specific panel (refs #3595)
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r--ishtar_common/widgets.py6
1 files changed, 5 insertions, 1 deletions
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 = """{