diff options
Diffstat (limited to 'ishtar_common/widgets.py')
| -rw-r--r-- | ishtar_common/widgets.py | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 59a034c00..84a58c98c 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -251,11 +251,13 @@ class Select2MultipleField(forms.MultipleChoiceField):  class DeleteWidget(forms.CheckboxInput):      def render(self, name, value, attrs=None, renderer=None):          final_attrs = flatatt( -            self.build_attrs(attrs, {"name": name, "value": '1'})) -        output = ['<tr class="delete"><td colspan="2">'] -        output.append(u"<button%s>%s</button>" % (final_attrs, _("Delete"))) -        output.append('</td></tr>') -        return mark_safe('\n'.join(output)) +            self.build_attrs( +                attrs, {"name": name, "value": '1', +                        'class': "btn btn-danger"}) +        ) +        output = u"<button%s>%s</button>" % (final_attrs, _("Delete")) + +        return mark_safe(output)  class ImageFileInput(ClearableFileInput): | 
