#7 New forms WIP

* adds saving functionality for new intervention form
* refactors new identifier generating, so a pre-generated identifier from a new element form will be checked again before saving
* adds css fixes for disturbing input field:focus bugs
* adds missing csrf token to new collapsible form
* adds/updates translations
* introduces mark_as_deleted as only marking instead of using delete() which will really delete from the db
This commit is contained in:
mipel
2021-09-23 15:05:17 +02:00
parent c43a5c243e
commit cb19c0f85d
11 changed files with 375 additions and 182 deletions

View File

@@ -1,5 +1,6 @@
{% load i18n l10n fontawesome_5 %}
<form method="post" action="{{ form.action_url }}" {% for attr_key, attr_val in form.form_attrs.items %} {{attr_key}}="{{attr_val}}"{% endfor %}>
{% csrf_token %}
<h2>{{form.form_title}}</h2>
<div id="help" class="col">
<div class="row rlp-gd-outline p-2">
@@ -31,7 +32,9 @@
</div>
<div id="dataCard" class="collapse" aria-labelledby="dataCardHeader">
<div class="card-body">
{% include 'form/generic_table_form_body.html' %}
{% with data_form as form %}
{% include 'form/generic_table_form_body.html' %}
{% endwith %}
</div>
</div>
</div>
@@ -44,9 +47,9 @@
{% trans 'Geometry' %}
</h5>
</div>
<div id="geometryCard" class="collapse" aria-labelledby="geometryCardHeader">
<div id="geometryCard" class="collapse show" aria-labelledby="geometryCardHeader">
<div class="card-body">
ToDo
{% include 'map/geom_form.html' %}
</div>
</div>
</div>