32 lines
1.0 KiB
HTML
32 lines
1.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block nav_extra %}<form method="post" action="/logout" style="display:inline; margin:0;"><button type="submit">Log out</button></form>{% endblock %}
|
|
{% block content %}
|
|
<h1>Manage</h1>
|
|
|
|
<h2>Add exercise</h2>
|
|
<form method="post" action="/exercises">
|
|
<label for="name">Name</label>
|
|
<input type="text" id="name" name="name" required>
|
|
<button type="submit">Add exercise</button>
|
|
</form>
|
|
|
|
<h2>Log reps</h2>
|
|
{% if exercises.is_empty() %}
|
|
<p>Add an exercise first.</p>
|
|
{% else %}
|
|
<form method="post" action="/entries">
|
|
<label for="exercise">Exercise</label>
|
|
<select id="exercise" name="exercise" required>
|
|
{% for name in exercises %}
|
|
<option value="{{ name }}">{{ name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<label for="date">Date</label>
|
|
<input type="date" id="date" name="date" value="{{ today }}" required>
|
|
<label for="reps">Reps</label>
|
|
<input type="number" id="reps" name="reps" min="0" required>
|
|
<button type="submit">Save</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endblock %}
|