EcoAccount detail view

* adds record control button
* adds html markup for invalid withdraws (unrecorded account)
* adds constraint to is_valid() method of NewWithdrawForm for checking whether the selected account for a withdraw is recorded or not
* adds/updates translations
This commit is contained in:
mipel
2021-08-10 14:15:42 +02:00
parent c165e3f990
commit 76bda648d0
6 changed files with 139 additions and 111 deletions

View File

@@ -12,6 +12,13 @@
</button>
</a>
{% if has_access %}
{% if is_ets_member %}
<a href="{% url 'home' %}" class="mr-2">
<button class="btn btn-default" title="{% trans 'Record' %}">
{% fa5_icon 'bookmark' %}
</button>
</a>
{% endif %}
{% if is_default_member %}
<a href="{% url 'home' %}" class="mr-2">
<button class="btn btn-default" title="{% trans 'Edit' %}">

View File

@@ -40,9 +40,12 @@
</thead>
<tbody>
{% for withdraw in obj.withdraws.all %}
<tr>
<tr {% if withdraw.account.deleted %}class="align-middle alert-danger" title="{% trans 'Eco-account deleted! Withdraw invalid!' %}" {% elif not withdraw.account.recorded %}class="align-middle alert-danger" title="{% trans 'Eco-account not recorded! Withdraw invalid!' %}" {% endif %}>
<td class="align-middle">
<a href="{% url 'intervention:open' withdraw.intervention.id %}">
{% if withdraw.account.deleted or not withdraw.account.recorded %}
{% fa5_icon 'exclamation-triangle' %}
{% endif %}
{{ withdraw.intervention.identifier }}
</a>
</td>