Fix bugs in html templates

This commit is contained in:
Edgar P. Burkhart 2023-12-30 11:12:38 +01:00
parent 47d8ff0382
commit fe95222474
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
7 changed files with 36 additions and 29 deletions

View file

@ -34,7 +34,9 @@
</td>
<td class="value">{{ cat.sum_m|pmrvalue }}</td>
<td class="bar m">
{% if cat.sum_m %}
<div style="width: {% widthratio cat.sum_m max -100 %}%"></div>
{% endif %}
{% if cat.sum < 0 %}
<div class="tot" style="width:{% widthratio cat.sum max -100 %}%">
<span>{{ cat.sum|pmrvalue }}</span>
@ -42,7 +44,9 @@
{% endif %}
</td>
<td class="bar p">
{% if cat.sum_p %}
<div style="width: {% widthratio cat.sum_p max 100 %}%"></div>
{% endif %}
{% if cat.sum > 0 %}
<div class="tot" style="width:{% widthratio cat.sum max 100 %}%">
<span>{{ cat.sum|pmrvalue }}</span>

View file

@ -30,7 +30,7 @@
{% block pre %}{% endblock %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{% if instance|adding %}<input hidden name="next" value="{{ request.path }}" />{% endif %}
{% if instance|adding %}<input hidden name="next" value="{{ request.path }}">{% endif %}
{{ form }}
</form>
{% block tables %}{% endblock %}

View file

@ -29,11 +29,11 @@
{% if not form.instance|adding %}
<a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a>
{% endif %}
<input type="reset" value="{% translate "Reset" %}" />
<input type="reset" value="{% translate "Reset" %}">
{% if form.instance|adding %}
<input type="submit" value="{% translate "Create" %}" />
<input type="submit" value="{% translate "Create" %}">
{% else %}
<input type="submit" value="{% translate "Save" %}" />
<input type="submit" value="{% translate "Save" %}">
{% endif %}
{% endblock %}
</td>

View file

@ -1,7 +1,7 @@
{% extends "main/form/form_base.html" %}
{% load i18n %}
{% block buttons %}
<input hidden value="{{ next }}" name="next" />
<input type="reset" />
<input type="submit" value="{% translate "Log in" %}" />
<input hidden value="{{ next }}" name="next">
<input type="reset">
<input type="submit" value="{% translate "Log in" %}">
{% endblock %}

View file

@ -1,4 +1,5 @@
{% extends "main/base.html" %}
{% load main_extras %}
{% load static %}
{% load i18n %}
{% block link %}

View file

@ -6,9 +6,11 @@
<col class="desc" span="3">
</colgroup>
<thead>
<tr>
<th>{% translate "Name" %}</th>
<th>{% translate "File" %}</th>
<th>{% translate "Delete" %}</th>
</tr>
</thead>
<tbody>
{% for invoice in transaction.invoices %}
@ -20,7 +22,7 @@
<a href="{{ invoice.file.url }}">{% translate "File" %} [{{ invoice.file|extension }}]</a>
</td>
<td>
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}</a>
</td>
</tr>
{% empty %}
@ -37,4 +39,4 @@
</tr>
</tfoot>
</table>
</div>
</div>

View file

@ -1,5 +1,5 @@
{% extends "transaction/transaction_list.html" %}
{% load i18n static category %}
{% load i18n main_extras static category %}
{% block link %}
{{ block.super }}
{% css "main/css/plot.css" %}