{% extends 'base.html' %}

{% block title %}Edit Text{% endblock %}
{% block header %}Edit Text{% endblock %}

{% block body %}

<h1>Edit Text</h1>

{% for field_name, field_errors in form.errors.items() %}
<p>{{ field_name }}
  <ul>
    {% for error in field_errors %}
    <li>{{ error }}</li>
    {% endfor %}
  </ul>
</p>
{% endfor %}

<form method="POST">
  {{ form.hidden_tag() }}

  <table id="edit-page-table">
    <tr><td>
        {{ form.text(class="form-largetextarea", dir=text_dir) }}
    </td></tr>
    <tr><td>
        <button id="submit" type="submit" class="btn btn-primary">Save</button>
    </td></tr>
    </table>
</form>

<table>
  <tr><td>
      <button onclick="history.back()">Cancel</button>
  </td></tr>
</table>

{% endblock %}

