2021-05-17 16:27:27 -04:00
|
|
|
{% extends 'base/layout.html' %}
|
2017-07-13 16:31:47 -04:00
|
|
|
{% load helpers %}
|
2021-12-13 15:36:51 -05:00
|
|
|
{% load render_table from django_tables2 %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2017-07-13 16:31:47 -04:00
|
|
|
|
2022-02-08 11:23:52 -05:00
|
|
|
{% comment %}
|
|
|
|
Blocks:
|
|
|
|
message_extra: Supplementary warning message content
|
|
|
|
|
|
|
|
Context:
|
|
|
|
model: The model class of the objects being deleted
|
|
|
|
form: The bulk delete form class
|
|
|
|
table: The table class for rendering list of objects being deleted
|
|
|
|
return_url: The URL to which the user is redirected after submitting the form
|
|
|
|
{% endcomment %}
|
|
|
|
|
2023-08-02 14:53:32 -04:00
|
|
|
{% block title %}
|
|
|
|
{% trans "Delete" %} {{ table.rows|length }} {{ model|meta:"verbose_name_plural"|bettertitle }}?
|
|
|
|
{% endblock %}
|
2017-07-13 16:31:47 -04:00
|
|
|
|
|
|
|
{% block content %}
|
2022-02-08 11:23:52 -05:00
|
|
|
<div class="container-md px-0">
|
|
|
|
<div class="alert alert-danger mb-3" role="alert">
|
2023-07-29 03:30:25 +07:00
|
|
|
<h4 class="alert-heading">{% trans "Confirm Bulk Deletion" %}</h4>
|
2022-02-08 11:23:52 -05:00
|
|
|
<hr />
|
2023-07-29 03:30:25 +07:00
|
|
|
<strong>{% trans "Warning" context "Noun" %}:</strong>
|
2023-09-11 16:17:02 -04:00
|
|
|
{% blocktrans trimmed with count=table.rows|length type_plural=model|meta:"verbose_name_plural" %}
|
2023-07-29 03:30:25 +07:00
|
|
|
The following operation will delete <strong>{{ count }}</strong> {{ type_plural }}. Please
|
|
|
|
carefully review the objects to be deleted and confirm below.
|
|
|
|
{% endblocktrans %}
|
2022-02-08 11:23:52 -05:00
|
|
|
{% block message_extra %}{% endblock %}
|
2017-07-13 16:31:47 -04:00
|
|
|
</div>
|
2022-02-08 11:23:52 -05:00
|
|
|
</div>
|
|
|
|
<div class="container-xl px-0">
|
|
|
|
<div class="table-responsive">
|
|
|
|
{% render_table table 'inc/table.html' %}
|
2017-07-13 16:31:47 -04:00
|
|
|
</div>
|
2022-02-08 11:23:52 -05:00
|
|
|
<div class="row mt-3">
|
|
|
|
<form action="" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
{% for field in form.hidden_fields %}
|
|
|
|
{{ field }}
|
|
|
|
{% endfor %}
|
|
|
|
<div class="text-end">
|
2023-07-29 03:30:25 +07:00
|
|
|
<button type="submit" name="_confirm" class="btn btn-danger">{% trans "Delete" %} {{ table.rows|length }} {{ model|meta:"verbose_name_plural" }}</button>
|
|
|
|
<a href="{{ return_url }}" class="btn btn-outline-dark">{% trans "Cancel" %}</a>
|
2022-02-08 11:23:52 -05:00
|
|
|
</div>
|
|
|
|
</form>
|
2017-07-13 16:31:47 -04:00
|
|
|
</div>
|
2022-02-08 11:23:52 -05:00
|
|
|
</div>
|
2021-05-17 16:27:27 -04:00
|
|
|
{% endblock content %}
|