{% extends "ox_layout.html" %}
{% block body %}
<div class="w3-container w3-teal">
  <h2>{{ title }}</h2>
</div>

<div class="w3-container w3-row-padding content">
  
  {% if intro %}
  <div class="w3-third content">      
    {{ intro }}
  </div>
  {% endif %}
  
  <div class="w3-third  w3-container w3-light-grey content">      
    <form action="" method="post" name="title"
	  enctype=multipart/form-data>
      {% for field in form %}
      {% if field.type in ['CSRFTokenField', 'HiddenField'] %}
      {{ field() }}
      {% else %}
      <div class="content form-group {% if field.errors %}error{% endif %}">
	<div class="tooltip">	
	  {{ field.label }}
	  <span class="tooltiptext"> {{ field.description }} </span>
	</div>
	<div class="input">
	  {% if field.name == "body" %}
          {{ field(rows=10, cols=40) }}
	  {% else %}
	  {{ field(style="width:90%") }}
	  {% endif %}
	  {% if field.errors or field.help_text %}
	</div>
        <span class="help-inline {% if field.errors %}error{% endif %}">
          {% if field.errors %}
          {{ field.errors|join(' ') }}
          {% else %}
          {{ field.help_text }}
          {% endif %}
        </span>
	{% endif %}
      </div>
      {% endif %}
      {% endfor %}
      <input type="submit" value="Go">
    </form>
  </div>
</div>
{% endblock %}
