Adding custom action to post list in admin panel
hemanthpyro - 5 months ago
I have a custom field "live_video"(checkbox) in my post.I want to create an action(similar to delete action) in the post list for this field "live_video" in such a way that when I check the post (one post at a time) and click the "live_video" button(need to show the button only for "video" category) I need to show a "pop up" with a message "Do you really want to make this post live ". When I click the "Yes" button in the pop up ,I need to make the current post (video) "live" and all other post should be normal(at a time only one video can be live),I need to remove video(post) which was "live" before clicking the button.
ryanthompson - 5 months ago
Bootbox is included in the admin theme so you can use that too. Here's an example of how I use the confirm function for it: https://github.com/pyrocms/accelerant-theme/blob/1.0/resources/js/theme/confirm.js