saxix/django-admin-extra-buttons

@button(enabled=False) is still clickable

Opened this issue · 0 comments

Hello! Thanks for the useful library. I've tried it out and I've found a few issues. Let's start with the first one.

class MyModelModelAdmin(ExtraButtonsMixin, admin.ModelAdmin):
    @button(enabled=False)
    def send_newsletter_now(self, request):
        self.message_user(request, 'The newsletter emails were sent successfully.')

The button is greyed out, but is still clickable. It should be disabled.