Use ConfirmationPopover rather than custom form

This commit is contained in:
George Drummond
2019-03-13 11:33:55 -04:00
parent 8ca0e04402
commit c3cb46873e
8 changed files with 42 additions and 17 deletions

View File

@@ -1,6 +1,16 @@
{% macro ConfirmationButton(btn_text, action, confirm_msg="Are you sure?", confirm_btn="Confirm", cancel_btn="Cancel") -%}
{% macro ConfirmationButton(
btn_text,
action,
btn_icon=None,
btn_class=None,
confirm_msg="Are you sure?",
confirm_btn="Confirm",
cancel_btn="Cancel")
-%}
<confirmation-popover
btn_text='{{ btn_text }}'
btn_icon='{{ btn_icon }}'
btn_class='{{ btn_class }}'
action='{{ action }}'
csrf_token='{{ csrf_token() }}'
confirm_msg='{{ confirm_msg }}'