Added in confirmation pop up upon bill deletion

This commit is contained in:
shoekwter 2022-12-08 14:44:34 -05:00
parent d8b6355101
commit f71af2aa1e

View file

@ -139,7 +139,7 @@
<a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a> <a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>
<form action="{{ url_for(".delete_bill", bill_id=bill.id) }}" method="POST"> <form action="{{ url_for(".delete_bill", bill_id=bill.id) }}" method="POST">
{{ csrf_form.csrf_token }} {{ csrf_form.csrf_token }}
<button class="action delete" type="submit" title="{{ _("delete") }}"></button> <button onclick="return confirm('Are you sure you want to delete this bill?')" class="action delete" type="submit" title="{{ _("delete") }}"></button>
</form> </form>
{% if bill.external_link %} {% if bill.external_link %}
<a class="show" href="{{ bill.external_link }}" ref="noopener" target="_blank" title="{{ _("show") }}">{{ _('show') }} </a> <a class="show" href="{{ bill.external_link }}" ref="noopener" target="_blank" title="{{ _("show") }}">{{ _('show') }} </a>