mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-29 20:51:11 +02:00
Lock invoices, delete them
This commit is contained in:
33
templates/treasury/invoice_confirm_delete.html
Normal file
33
templates/treasury/invoice_confirm_delete.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Delete invoice" %}</h4>
|
||||
</div>
|
||||
{% if object.locked %}
|
||||
<div class="card-body">
|
||||
<div class="alert alert-danger">
|
||||
{% blocktrans %}This invoice is locked and can't be deleted.{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans %}Are you sure you want to delete this invoice? This action can't be undone.{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-footer text-center">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<a class="btn btn-primary" href="{% url 'treasury:invoice_list' %}">{% trans "Return to invoices list" %}</a>
|
||||
{% if not object.locked %}
|
||||
<button class="btn btn-danger" type="submit">{% trans "Delete" %}</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user