Documents removing

* adds generic modal rendering using package django-bootstrap-modal-forms
* adds document file removing from hard drive
* adds translations
This commit is contained in:
mipel
2021-07-23 18:27:53 +02:00
parent df8b62de22
commit 76c7cce9bc
13 changed files with 202 additions and 61 deletions

View File

@@ -1,7 +1,12 @@
{% extends 'base.html' %}
{% load i18n static fontawesome_5 %}
{% block head %}
{% endblock %}
{% block body %}
<div id="detail-header" class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<h3>{% trans 'Intervention' %} {{intervention.identifier}}</h3>
@@ -293,11 +298,9 @@
</td>
<td class="align-middle">{{ doc.comment }}</td>
<td>
<a href="{% url 'doc-remove' doc.id %}" class="mr-2">
<button class="btn btn-default" title="{% trans 'Remove document' %}">
{% fa5_icon 'trash' %}
</button>
</a>
<button data-form-url="{% url 'doc-remove' doc.id %}" class="btn btn-default del-btn" title="{% trans 'Remove document' %}">
{% fa5_icon 'trash' %}
</button>
</td>
</tr>
{% endfor %}
@@ -308,4 +311,8 @@
</div>
</div>
{% with 'del-btn' as btn_class %}
{% include 'modal/modal_form_script.html' %}
{% endwith %}
{% endblock %}