Improve and fix user accounts

This commit is contained in:
Skia
2016-08-18 21:06:10 +02:00
parent 05bd177a9d
commit b69c3a6792
7 changed files with 73 additions and 9 deletions

View File

@ -1,10 +1,16 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Delete confirmation{% endtrans %}
{% endblock %}
{% block content %}
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
</form>
<form method="GET" action="javascript:history.back();">
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,10 +1,16 @@
{% extends "core/file.jinja" %}
{% block title %}
{% trans %}Delete confirmation{% endtrans %}
{% endblock %}
{% block file %}
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
</form>
<form method="GET" action="javascript:history.back();">
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
</form>
{% endblock %}

View File

@ -28,6 +28,9 @@
<td><a href="{{ i.operator.get_absolute_url() }}">{{ i.operator.get_display_name() }}</a></td>
<td>{{ i.amount }} €</td>
<td>{{ i.get_payment_method_display() }}</td>
{% if i.is_owned_by(user) %}
<td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">Delete</a></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
@ -57,6 +60,9 @@
<td>{{ i.quantity }}</td>
<td>{{ i.quantity * i.unit_price }} €</td>
<td>{{ i.get_payment_method_display() }}</td>
{% if i.is_owned_by(user) %}
<td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}">Delete</a></td>
{% endif %}
</tr>
{% endfor %}
</tbody>