EcoAccount withdraws
* adds functionality for withdraws from eco accounts in detail view of interventions and eco account as well * adds get_surface() method to AbstractCompensation class to provide a simple getter for a sql calculation * adds get_surface_withdraws() method to EcoAccount class to provide a simple getter for a sql calculation * renames some routes to match coherent rout naming * adds logic check on NewWithdrawForm * renames templates/table directory to templates/form, since there are form-table templates inside --> more clarity * adds new autocomplete routes to konova/urls.py for Interventions and EcoAccounts * adds/updates translations * adds/updates template comments * updates requirements.txt
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block head %}
|
||||
{{ form.media }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<h4>
|
||||
{{ form.form_title }}
|
||||
</h4>
|
||||
{% if form.form_caption is not None %}
|
||||
<small>
|
||||
{{ form.form_caption }}
|
||||
</small>
|
||||
{% endif %}
|
||||
<form method="post" action="{{ form.action_url }}" {% for attr_key, attr_val in form.form_attrs.items %} {{attr_key}}="{{attr_val}}"{% endfor %}>
|
||||
{% csrf_token %}
|
||||
{% include 'table/generic_table_form_body.html' %}
|
||||
<div class="row">
|
||||
<div class="col-md">
|
||||
<a href="{{ form.cancel_redirect }}">
|
||||
<button class="btn btn-default" type="button" title="{% trans 'Cancel' %}">{% trans 'Cancel' %}</button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md d-flex justify-content-end">
|
||||
<button class="btn btn-default" type="submit" title="{% trans 'Save' %}">{% trans 'Save' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{{ form.media }}
|
||||
{% endblock %}
|
||||
@@ -1,22 +0,0 @@
|
||||
{% load i18n %}
|
||||
<table class="table">
|
||||
<tbody>
|
||||
{% for field in form %}
|
||||
<tr title="{{ field.help_text }}" class="{% if field.errors %}error{% endif %}">
|
||||
<th scope="row" class="col-sm-3">
|
||||
<div>{{ field.label }}<span class="label-required">{% if field.field.required %}*{% endif %}</span></div>
|
||||
<small>{{ field.help_text }}</small>
|
||||
</th>
|
||||
<td class="col-sm-9">
|
||||
{{ field }}
|
||||
{% for error in field.errors %}
|
||||
<strong>{{ error }}</strong>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if form.has_required_fields %}
|
||||
<small>{% trans 'Fields with * are required.' %}</small>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user