iommirocks / iommi

Your first pick for a django power cord
http://iommi.rocks
BSD 3-Clause "New" or "Revised" License
718 stars 47 forks source link

Adding a `post_handler` on a `Table` action creates a button that doesn't do anything when clicked #567

Open boxed opened 2 weeks ago

boxed commented 2 weeks ago
confirm_slots = Table(
        title=gettext('Confirm planning changes'),
        auto__model=Slot,
        actions__confirm=Action.button(
            post_handler=confirm_slots__post_handler,
        ),
    )

The reason nothing happens is because the <button> will end up in the html without a surrounding <form>, which means there is nothing to submit.

I think we should have an error or warning for this. I found it surprising.