mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
53 lines
1.5 KiB
HTML
53 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% load custom_tags %}
|
|
{% load custom_tags %}
|
|
{% load crispy_forms_tags %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans 'Delete' %} - {{ title }}{% endblock %}
|
|
|
|
{% block extra_head %}
|
|
{{ form.media }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h3>{% trans 'Delete' %} {{ title }}</h3>
|
|
|
|
|
|
<form action="." method="post">
|
|
{% csrf_token %}
|
|
<div class="alert alert-warning" role="alert">
|
|
{% blocktrans %}Are you sure you want to delete the {{ title }}: <b>{{ object }}</b> {% endblocktrans %}
|
|
</div>
|
|
{{ form|crispy }}
|
|
|
|
{% if related_objects %}
|
|
{% blocktrans %} <i>{{ object }}</i> could not be deleted because it is still referenced by the following instances: {% endblocktrans %}
|
|
<br/>
|
|
<br/>
|
|
{% for o in related_objects %}
|
|
{% class_name o.model as name %}
|
|
<h5>{{ name }}</h5>
|
|
<ul>
|
|
{% for e in o %}
|
|
<li>
|
|
<span class="badge badge-info">#{{ e.id }}</span> {{ e }}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
<br/>
|
|
{% endif %}
|
|
|
|
<button class="btn btn-success" type="submit" href="{{ success_url }}"><i
|
|
class="fas fa-trash-alt"></i> {% trans 'Confirm' %}</button>
|
|
<a href="javascript:history.back()" class="btn btn-danger"><i class="fas fa-undo-alt"></i> {% trans 'Cancel' %}
|
|
</a>
|
|
</form>
|
|
|
|
|
|
{% endblock %} |