{% extends "base.html" %}

{% block title %}Change Rower Export Settings{% endblock %}

{% block content %}
<script type="text/javascript" src="/static/js/reorderSelect.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>


<div class="grid_12 alpha">
  {% if workoutid %}
  <div class="grid_2 suffix_10 alpha">
    <p>
      <a class="button gray small" href="/rowers/workout/{{ workoutid }}/workflow">Return to Workout</a>
    </p>
  </div>
  {% endif %}
  <div class-"grid_12 alpha">
    <h1>Workflow Page Configuration</h1>
    <p>On this page, you can configure the content of your "Workflow" page
      for each workout. If you want to remove an element, change it to "None".
      You can add one new element at a time.</p>
    <div class="grid_4 alpha">
      <h2>Left Panel</h2>
      <form enctype="multipart/form-data" action="" method="post">
        {{ leftpanel_formset.management_form }}
          <table>
            {{ leftpanel_formset.as_table }}
          </table>
        {% csrf_token %}
        <input class="grid_2 alpha button green" type="submit" value="Save">
    </form>
    </div>

    <div class="grid_4">
      <h2>Middle Panel</h2>
      <form enctype="multipart/form-data" action="" method="post">
        {{ middlepanel_formset.management_form }}
          <table>
            {{ middlepanel_formset.as_table }}
          </table>
        {% csrf_token %}
        <input class="grid_2 alpha button green" type="submit" value="Save">
      </form>
    </div>

    <div class="grid_4 omega">
      <div class="grid_2 prefix_2 alpha">
        {% if rower.defaultlandingpage == 'workout_edit_view' %}
        <p>Default landing page is Edit View. Set default landing page to</p>
        <a class="button green small" href="/rowers/me/workflowdefault">Workflow View</a>
        {% else %}
        <p>Default landing page is Workflow View. Set default landing page to</p>
        <a class="button green small" href="/rowers/me/workflowdefault">Edit View</a>
        {% endif %}
      </div>
    </div>

  </div>
</div>




{% endblock %}
