removed delete colums in favor of btn in edit view

This commit is contained in:
vabene1111
2018-05-25 14:54:02 +02:00
parent 7bc102f8df
commit c5986c6e7f
5 changed files with 21 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load class_tag %}
{% block title %}{% trans 'Edit' %} - {{ title }}{% endblock %}
@@ -16,6 +17,7 @@
{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="Submit" class="btn btn-success">
<a href="{% url 'redirect_delete' form.instance|get_class|lower form.instance.pk %}" class="btn btn-danger">{% trans 'Delete' %}</a>
</form>
{% endblock %}

View File

@@ -16,15 +16,18 @@
{% if filter %}
<div class="card">
<div class="card-header">
<i class="fas fa-search"></i> {% trans "Search" %}
<i class="fas fa-search"></i> {% trans "Search" %} <input type="text" class="form-control">
<a data-toggle="collapse" href="#collapse_search" role="button" aria-expanded="false" aria-controls="collapse_search">{% trans 'Advanced Search' %}</a>
</div>
<div class="card-body">
<form action="" method="get" id="search_form">
{{ filter.form|crispy }}
<input class="btn btn-primary" type="submit"/>
<a href="#" onclick="window.location = window.location.pathname;"
class="btn btn-warning">{% trans 'Reset' %}</a>
</form>
<div class="collapse" id="collapse_search">
<div class="card-body">
<form action="" method="get" id="search_form">
{{ filter.form|crispy }}
<input class="btn btn-primary" type="submit"/>
<a href="#" onclick="window.location = window.location.pathname;"
class="btn btn-warning">{% trans 'Reset' %}</a>
</form>
</div>
</div>
</div>
{% endif %}