Add a 'cancel' button on the places form

This commit is contained in:
Fred Pauchet 2021-10-20 21:47:24 +02:00
parent 76eb02585b
commit 359c215924
1 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@
<div class="card-body">
<form action="{% if placeid %}{% url 'place_update' placeid %}{% else %}{% url 'place_create' %}{% endif %}" method="post" class="form-horizontal" id="formulaire" name="formulaire">
{% csrf_token %}
<div class="form-group row {% if form.name.errors %}has-error has-feedback{% endif %}">
<div class="form-group row {% if form.name.errors %}has-error has-feedback{% endif %}">
<label for="id_name" class="col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label">Name</label>
<div class="col-8 col-sm-10 col-md-10 col-lg-10 col-xl-10">
{{ form.name }}
@ -25,7 +25,7 @@
{% endif %}
</div>
</div>
<div class="form-group row {% if form.address.errors %}has-error has-feedback{% endif %}">
<div class="form-group row {% if form.address.errors %}has-error has-feedback{% endif %}">
<label for="id_name" class="col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label">Address</label>
<div class="col-8 col-sm-6 col-md-6 col-lg-6 col-xl-6">
{{ form.address }}
@ -79,6 +79,7 @@
</div>
<div class="form-group text-center">
<input type="submit" value="Save" class="btn btn-warning" />
<a href="{% url 'place_list' %}" class="btn btn-success">Cancel</a>
</div>
</form>
</div>