{% extends 'whoop/base.html' %}

{% block body %}
  <h2>Re-authenticate WHOOP</h2>

  {% if error %}
  <div style="color: red; margin-bottom: 10px;">
      <strong>Error:</strong> {{ error }}
  </div>
  {% endif %}

  <form method="post" action="{% url 'whoopreauth' %}">
  {% csrf_token %}
  <table>
  <tr>
      <td>{{ form.username.label_tag }}</td>
      <td>{{ form.username }}</td>
  </tr>
  <tr>
      <td>{{ form.password.label_tag }}</td>
      <td>{{ form.password }}</td>
  </tr>
  </table>

  <input type="submit" value="Re-authenticate">
  <input type="hidden" name="next" value="{% url 'whoopsuccess' %}">
  </form>

  <p><a href="{% url 'whoopdashboard' %}">Back to Dashboard</a></p>
{% endblock %}
