diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/widgets.py | 6 | 
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 = """{ | 
