Commit 77d152c6 authored by Willard's avatar Willard

Move delete button on dish entry, add confirmation

parent 540dcf8b
......@@ -25,9 +25,6 @@
<a href="{{ url_for('stall', stall_id=stall.id) }}"><button type="button" class="link-button">Back</button></a>
</div>
</form>
<form action="{{ url_for('delete_dish', stall_id=stall.id, dish_id=dish.id) }}" method="POST">
<button type="submit" class="button-delete">Delete</button></a>
</form>
</div>
<script>
document.getElementById("image-upload").onchange = function() {
......
......@@ -17,7 +17,12 @@
<div class="list-info">
<span class="list-name">{{dish.name}}</span>
<span class="list-price">Php{{dish.price}}</span>
<div>
<a href="{{ url_for('edit_dish', stall_id=stall.id, dish_id=dish.id) }}"><button class="list-button">Edit</button></a>
<form action="{{ url_for('delete_dish', stall_id=stall.id, dish_id=dish.id) }}" method="POST" onsubmit="return confirm('Are you sure you want to delete {{dish.name}}')">
<button type="submit" class="list-button button-delete">Delete</button></a>
</form>
</div>
</div>
</div>
{% endfor %} {% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment