{% extends "newbase.html" %}

{% block title %}Change Rower Workflow Page Settings{% endblock %}

{% block main %}
<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>

<h1>Change Workflow Page Layout for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>

<ul class="main-content">
  {% if workoutid %}
  <li class="grid_4">
    <p>
      <a class="button gray small" href="/rowers/workout/{{ workoutid }}/workflow/">Return to Workout</a>
    </p>
  </li>
  {% endif %}
  <li>
    <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>
  </li>
  <li>
    <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>
  </li>
  <li>
    {% 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 %}
  </li>
</ul>


{% endblock %}


{% block sidebar %}
{% include 'menu_profile.html' %}
{% endblock %}
