diff options
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/templates/ishtar/wizard/wizard_treatement_deletion.html | 27 | ||||
-rw-r--r-- | archaeological_finds/wizards.py | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/archaeological_finds/templates/ishtar/wizard/wizard_treatement_deletion.html b/archaeological_finds/templates/ishtar/wizard/wizard_treatement_deletion.html new file mode 100644 index 000000000..b0ebe7409 --- /dev/null +++ b/archaeological_finds/templates/ishtar/wizard/wizard_treatement_deletion.html @@ -0,0 +1,27 @@ +{% extends "ishtar/wizard/confirm_wizard.html" %} +{% load i18n %} + +{% block "warning_message" %} +{% with has_downstream=current_object.downstream.count %} +<div class="alert alert-{% if has_downstream %}danger{% else %}warning{% endif%}"> + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> + {% trans "Are you sure you want to delete this treatment?" %} +{% if has_downstream %} + {% trans "The following finds will be deleted and restored to a previous version."%} + <ul>{% for item in current_object.downstream.all %} + <li> + {{item}} + </li> + {% endfor %}</ul> + {% trans "All changes made to the associated finds since this treatment record will be lost!" %} +{% endif %} +</div> + +<div class="alert alert-info"> + {% trans "Treatment informations:" %} +</div> + + + +{% endwith %} +{% endblock %} diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py index 29ca50056..8ed7061e2 100644 --- a/archaeological_finds/wizards.py +++ b/archaeological_finds/wizards.py @@ -396,6 +396,7 @@ class Treatment1NWizard(TreatmentBase): class TreatmentDeletionWizard(DeletionWizard): + wizard_confirm = 'ishtar/wizard/wizard_treatement_deletion.html' model = models.Treatment fields = ['label', 'other_reference', 'year', 'index', 'treatment_types', 'location', 'person', 'organization', |