small_form_host.html 1.55 KB
Newer Older
Bryan  BRANCOTTE's avatar
Bryan BRANCOTTE committed
1
2
3
4
5
{% extends basetheme_bootstrap_base_template %}
{% load crispy_forms_tags %}
{% load static %}
{% load i18n %}

Bryan  BRANCOTTE's avatar
Bryan BRANCOTTE committed
6
7
8
9
10
11
12
{% block extra_js %}
{{block.super}}
{% if extra_js_file %}
<script src="{% static extra_js_file %}"></script>
{% endif%}
{% endblock %}

Bryan  BRANCOTTE's avatar
Bryan BRANCOTTE committed
13
14
15
16
{% block title %}{{ title }}{% endblock %}
{% block page_title %}{{ page_title|default:title }}{% endblock %}

{% block content %}
17
{%if full_width_form_title%}
18
<div class="col-12 col-xs-12 {{full_width_form_title_classes|default:'h2'}}">{{full_width_form_title}}</div>
19
{%endif%}
20
<div class="col-12 col-xs-12 {%if custom_css_width %}{{custom_css_width}}{%else%}{%if not medium_width%}col-sm-10 col-sm-offset-1 offset-sm-1 col-md-8 col-md-offset-2 offset-md-2 col-lg-6 col-lg-offset-3 offset-lg-3 col-xl-4 col-xl-offset-4 offset-xl-4 col-xxl-2 col-xxl-offset-5{%endif%}{%if medium_width%}col-md-10 col-md-offset-1 offset-md-1 col-lg-8 col-lg-offset-2 offset-lg-2 col-xl-6 col-xl-offset-3 offset-xl-3 col-xxl-4 col-xxl-offset-4 col-xxxl-2 col-xxxl-offset-5{%endif%}{%endif%}">
Bryan  BRANCOTTE's avatar
Bryan BRANCOTTE committed
21
22
23
24
25
26
    {%if form_title%}<h2>{{form_title}}</h2>{%endif%}
    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        {%if form%}{{ form|crispy }}{%endif%}
        {%if cancel_url%}<a role="button" class="btn btn-primary" href="{{cancel_url}}">{{ cancel_text|default:"Cancel" }}</a>{%endif%}
        <div class="form-class {{btn_container_classes|default:'pull-right'}}">
27
        <button class="{{btn_classes|default:'btn btn-primary'}}" type="submit">{{ submit_text|default:"OK" }}</button>
Bryan  BRANCOTTE's avatar
Bryan BRANCOTTE committed
28
29
30
31
        </div>
    </form>
</div>
{% endblock %}