Add form css for category

This commit is contained in:
Edgar P. Burkhart 2022-05-20 21:59:10 +02:00
parent 30db14669f
commit 038261e97c
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -1,18 +1,37 @@
{% extends "main/base.html" %}
{% load static %}
{% block link %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'css/form.css' %}" type="text/css" />
{% endblock %}
{% block body %}
<h1>{{ category.tree|join:" → " }}</h1>
<h1>{{ category }}</h1>
<form action="{% url 'update_category' category.id %}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" />
{% for field in form %}
{{ field.errors }}
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% endfor %}
<div class="buttons">
<input type="reset" />
<input type="submit" value="Save Category" />
</div>
</form>
{% if transactions %}
<h2>Transactions ({{ transactions|length }})</h2>
<ul>
{{ transactions|unordered_list }}
{% for transaction in transactions %}
<li>
<a href="{% url 'transaction' transaction.id %}">
{{ transaction }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}