{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}

{% block title %}Advanced Features {% endblock %}

{% block main %}

<h1>Run OTW Power Calculations</h1>
<ul class="main-content">
  <li class="grid_4">
    <p>
      For the advanced OTW power and wind correction calculation, 
      we need to know the boat type and the average weight per crew member.
      Currently only 1x (single) is implemented. Setting the value to 
      2x (double) will still run the calculations for a single.
      We use FISA minimum boat weight and standard rigging for our calculations. 
    </p>

    <p>The Quick calculation option potentially speeds up the calculation,
      at the cost of a slight reduction in accuracy. It is recommended
      to keep this option selected.</p>

    <p>
      The power calculations take wind and stream as inputs. 
    </p>

    <p>
      <a href="/rowers/workout/{{ workout.id|encode }}/wind">Set wind strength and direction</a>
    </p>
    
    <p>
      <a href="/rowers/workout/{{ workout.id|encode }}/stream">
        Set river stream strength
      </a>
    </p>
    
  </li>
  <li class="grid_2">
    <form enctype="multipart/form-data" action="{{ formloc }}" method="post">
      {% if form.errors %}
      <p style="color: red;">
        Please correct the error{{ form.errors|pluralize }} below.
      </p>
      {% endif %}
      
      <table>
        {{ form.as_table }}
      </table>
      {% csrf_token %}
      <p><input class="button" type="submit" value="Update & Run"></p>

    </form>
  </li>
  <li class="grid_2">
    <div>
      <img src="/static/img/rivercurrent.jpg" width="400">
    </div>
    <div>
      The Rowsandall Physics Department at work.
    </div>
  </li>
</ul>


{% endblock %}

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