timetracker/games/templates/add_purchase.html

43 lines
1.3 KiB
HTML
Raw Normal View History

2023-11-09 20:01:01 +00:00
{% extends "base.html" %}
{% load static %}
2023-11-17 20:06:57 +00:00
{% block title %}
{{ title }}
{% endblock title %}
2023-11-09 20:01:01 +00:00
{% block content %}
<form method="post" enctype="multipart/form-data">
<table class="mx-auto">
2023-11-17 20:06:57 +00:00
{% csrf_token %}
{{ form.as_table }}
<tr>
<td></td>
<td>
<input type="submit" name="submit" value="Submit" />
</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit"
2024-04-04 09:27:33 +00:00
name="submit_and_redirect"
value="Submit & Create Session" />
2023-11-17 20:06:57 +00:00
</td>
</tr>
2024-04-29 14:20:44 +00:00
{% if purchase_id %}
2024-04-30 10:04:16 +00:00
<tr>
<td></td>
<td>
2024-08-08 12:47:51 +00:00
<a href="{% url 'delete_purchase' purchase_id %}"
class="text-red-600"
onclick="return confirm('Are you sure you want to delete this purchase?');">Delete</a>
2024-04-30 10:04:16 +00:00
</td>
</tr>
2024-04-29 14:20:44 +00:00
{% endif %}
2023-11-09 20:01:01 +00:00
</table>
</form>
{% endblock content %}
{% block scripts %}
{% if script_name %}
<script type="module" src="{% static 'js/'|add:script_name %}"></script>
{% endif %}
{% endblock scripts %}