* 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
		
			
				
	
	
		
			68 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% 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">
 | 
						|
            <div class="col-lg-1 rlp-r-inv">
 | 
						|
                <span class="d-flex justify-content-center align-items-center h-100">
 | 
						|
                    {% fa5_icon 'question-circle' 'far' %}
 | 
						|
                </span>
 | 
						|
            </div>
 | 
						|
            <div class="col-lg-11">
 | 
						|
                <small>
 | 
						|
                    {% blocktrans %}
 | 
						|
                    First enter the most basic data. Of course you can change everything later.
 | 
						|
                    All further data, like documents or further details, can be added in the detail view after saving
 | 
						|
                    your new entry.
 | 
						|
                    {% endblocktrans %}
 | 
						|
                    <br>
 | 
						|
                    {% trans 'Open the input topic with a simple click.' %}
 | 
						|
                </small>
 | 
						|
            </div>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
    <div class="mt-3">
 | 
						|
        <div class="card">
 | 
						|
            <div id="dataCardHeader" class="card-header cursor-pointer rlp-r" data-toggle="collapse" data-target="#dataCard" aria-expanded="true" aria-controls="dataCard">
 | 
						|
                <h5>
 | 
						|
                    {% fa5_icon 'list' %}
 | 
						|
                    {% trans 'General data' %}
 | 
						|
                </h5>
 | 
						|
            </div>
 | 
						|
            <div id="dataCard" class="collapse" aria-labelledby="dataCardHeader">
 | 
						|
                <div class="card-body">
 | 
						|
                    {% with data_form as form %}
 | 
						|
                        {% include 'form/generic_table_form_body.html' %}
 | 
						|
                    {% endwith %}
 | 
						|
                </div>
 | 
						|
            </div>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
    <div class="">
 | 
						|
        <div class="card">
 | 
						|
            <div id="geometryCardHeader" class="card-header cursor-pointer rlp-r" data-toggle="collapse" data-target="#geometryCard" aria-expanded="true" aria-controls="geometryCard">
 | 
						|
                <h5>
 | 
						|
                    {% fa5_icon 'map-marked-alt' %}
 | 
						|
                    {% trans 'Geometry' %}
 | 
						|
                </h5>
 | 
						|
            </div>
 | 
						|
            <div id="geometryCard" class="collapse show" aria-labelledby="geometryCardHeader">
 | 
						|
                <div class="card-body">
 | 
						|
                    {% include 'map/geom_form.html' %}
 | 
						|
                </div>
 | 
						|
            </div>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
 | 
						|
    <div class="row">
 | 
						|
        <div class="col-6">
 | 
						|
            <a href="{{ form.cancel_redirect }}">
 | 
						|
                <button class="btn btn-default" type="button" title="{% trans 'Cancel' %}">{% trans 'Cancel' %}</button>
 | 
						|
            </a>
 | 
						|
        </div>
 | 
						|
        <div class="col-6 d-flex justify-content-end">
 | 
						|
            <button class="btn btn-default" type="submit" title="{% trans 'Save' %}">{% trans 'Save' %}</button>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
</form> |