admin: add generic create and delete template

This commit is contained in:
Jens Langhammer
2018-11-26 22:30:14 +01:00
parent 5c5c865c0b
commit 755997a9c7
5 changed files with 38 additions and 8 deletions

View File

@ -0,0 +1,11 @@
{% extends "generic/create.html" %}
{% load i18n %}
{% block title %}
{% blocktrans with type=request.GET.type %}Create {{ type }}{% endblocktrans %}
{% endblock %}
{% block above_form %}
<h1>{% blocktrans with type=request.GET.type %}Create {{ type }}{% endblocktrans %}</h1>
{% endblock %}

View File

@ -0,0 +1,20 @@
{% extends "administration/base.html" %}
{% load i18n %}
{% load utils %}
{% block content %}
<div class="container">
{% block above_form %}
<h1>{% trans 'Delete' %}</h1>
{% endblock %}
<div class="">
<form method="post" class="form-horizontal">
{% csrf_token %}
<p>Are you sure you want to delete "{{ object }}"?</p>
<a href="{% back %}" class="btn btn-default">{% trans 'Back' %}</a>
<input type="submit" class="btn btn-danger" value="{% trans 'Delete' %}" />
</form>
</div>
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load utils %}
{% block content %}
<div class="container">
@ -10,6 +10,7 @@
<div class="">
<form action="" method="post" class="form-horizontal">
{% include 'blocks/form.html' with form=form %}
<a class="btn btn-default" href="{% back %}">{% trans "Cancel" %}</a>
<input type="submit" class="btn btn-primary" value="{% trans 'Create' %}" />
</form>
</div>