Add form css for category
This commit is contained in:
parent
30db14669f
commit
038261e97c
1 changed files with 23 additions and 4 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue