* adds document upload form * refactors modal form templates into form classes * adds document upload route to intervention routes of urls.py
		
			
				
	
	
		
			36 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% 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 %} |