|
@@ -1,13 +1,52 @@
|
|
|
{% extends "base.html" %}
|
|
|
-{% load wagtailcore_tags %}
|
|
|
+{% load wagtailcore_tags navigation_tags wagtailimages_tags %}
|
|
|
|
|
|
{% block content %}
|
|
|
- {{ page.title }}
|
|
|
- {{ page.intro|richtext }}
|
|
|
-
|
|
|
- <form action="{% pageurl page %}" method="POST">
|
|
|
- {% csrf_token %}
|
|
|
- {{ form.as_p }}
|
|
|
- <input type="submit">
|
|
|
- </form>
|
|
|
+{% include "base/include/header-hero.html" %}
|
|
|
+
|
|
|
+<div class="container">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-8">
|
|
|
+ {% if page.intro %}
|
|
|
+ <p class="intro">{{ page.intro|richtext }}</p>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<div class="container">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-8 form-page">
|
|
|
+ {% comment %}
|
|
|
+ You could render your form using a Django rendering shortcut such as `{{ form.as_p }}` but that will tend towards unsemantic code, and make it difficult to style. You can read more on Django form at:
|
|
|
+ https://docs.djangoproject.com/en/1.10/topics/forms/#form-rendering-options
|
|
|
+ {% endcomment %}
|
|
|
+ <form action="{% pageurl page %}" method="POST">
|
|
|
+ {% csrf_token %}
|
|
|
+ {% if form.subject.errors %}
|
|
|
+ <ol>
|
|
|
+ {% for error in form.subject.errors %}
|
|
|
+ <li><strong>{{ error|escape }}</strong></li>
|
|
|
+ {% endfor %}
|
|
|
+ </ol>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% for field in form %}
|
|
|
+ <div class="fieldWrapper">
|
|
|
+
|
|
|
+ {{ field.label_tag }}{% if field.field.required %}<span class="required">*</span>{% endif %}
|
|
|
+
|
|
|
+ {{ field }}
|
|
|
+
|
|
|
+ {% if field.help_text %}
|
|
|
+ <p class="help">{{ field.help_text|safe }}</p>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ {% endfor %}
|
|
|
+
|
|
|
+ <input type="submit">
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
{% endblock content %}
|