Compensation control
* removes CompensationControl model * adds comment field to CompensationAction * adds max length of 200 for comment fields in forms * adds rendering of error messages in case of invalid form input * adds/updates translations
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% load i18n l10n fontawesome_5 %}
|
||||
{% load i18n l10n fontawesome_5 humanize %}
|
||||
<div id="related-documents" class="card">
|
||||
<div class="card-header rlp-r">
|
||||
<div class="row">
|
||||
@@ -31,7 +31,7 @@
|
||||
{% trans 'Amount' context 'Compensation' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'Unit' %}
|
||||
{% trans 'Comment' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'Action' %}
|
||||
@@ -44,8 +44,8 @@
|
||||
<td class="align-middle">
|
||||
{{ action.action_type }}
|
||||
</td>
|
||||
<td class="align-middle">{{ action.amount }}</td>
|
||||
<td class="align-middle">{{ action.unit_humanize }}</td>
|
||||
<td class="align-middle">{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}</td>
|
||||
<td class="align-middle">{{ action.comment|default_if_none:"" }}</td>
|
||||
<td>
|
||||
{% if is_default_member and has_access %}
|
||||
<button data-form-url="{% url 'compensation:action-remove' action.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove action' %}">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="card-body scroll-300">
|
||||
{% if sum_before_states > sum_after_states %}
|
||||
<div class="row alert alert-danger">
|
||||
{% trans 'Missing surfaces: ' %}{{ diff_states|floatformat:2 }} m²
|
||||
{% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m²
|
||||
</div>
|
||||
{% endif %}
|
||||
<table class="table table-hover">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="card-body scroll-300">
|
||||
{% if sum_before_states < sum_after_states %}
|
||||
<div class="row alert alert-danger">
|
||||
{% trans 'Missing surfaces: ' %}{{ diff_states|floatformat:2 }} m²
|
||||
{% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m²
|
||||
</div>
|
||||
{% endif %}
|
||||
<table class="table table-hover">
|
||||
|
||||
Reference in New Issue
Block a user