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" %}
|
{% extends "main/base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block link %}
|
||||||
|
{{ block.super }}
|
||||||
|
<link rel="stylesheet" href="{% static 'css/form.css' %}" type="text/css" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>{{ category.tree|join:" → " }}</h1>
|
<h1>{{ category }}</h1>
|
||||||
|
|
||||||
<form action="{% url 'update_category' category.id %}" method="post">
|
<form action="{% url 'update_category' category.id %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% for field in form %}
|
||||||
<input type="submit" />
|
{{ 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>
|
</form>
|
||||||
|
|
||||||
{% if transactions %}
|
{% if transactions %}
|
||||||
<h2>Transactions ({{ transactions|length }})</h2>
|
<h2>Transactions ({{ transactions|length }})</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{{ transactions|unordered_list }}
|
{% for transaction in transactions %}
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'transaction' transaction.id %}">
|
||||||
|
{{ transaction }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue