pallets-eco / flask-admin

Simple and extensible administrative interface framework for Flask
https://flask-admin.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5.8k stars 1.58k forks source link

Add POST based equivalent to LinkRowAction #1856

Open cancan101 opened 5 years ago

cancan101 commented 5 years ago

Currently there is LinkRowAction which allows extending the list of actions (using column_extra_row_actions) to include additional links (GET based). There is no way to add additional actions that require a form POST (e.g. how the delete actions works.). I suggest adding a new subclass of BaseListRowAction.

For reference here is the bootstrap3 macro for delete: https://github.com/flask-admin/flask-admin/blob/e4d83a91cb2bebdaae8867221b6f56e4e23cf760/flask_admin/templates/bootstrap3/admin/model/row_actions.html#L25-L38

and this the macro for LinkRowAction: https://github.com/flask-admin/flask-admin/blob/e4d83a91cb2bebdaae8867221b6f56e4e23cf760/flask_admin/templates/bootstrap3/admin/model/row_actions.html#L3-L7

waylonwang commented 5 years ago

I have the same suggest