summaryrefslogtreecommitdiff
path: root/app/templates/workout/record.html
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-04-24 19:27:41 -0500
committerstilbruch <stilbruch@protonmail.com>2022-04-24 19:27:41 -0500
commit0dd74e2b672053e3296bc814a36988ba8463854f (patch)
treeccd0c41d15324513f419fa2b157d65268b6b63b2 /app/templates/workout/record.html
parent586285028845c8ed9a2e859f1266c233b8278311 (diff)
downloadStrengthy-0dd74e2b672053e3296bc814a36988ba8463854f.tar.xz
Strengthy-0dd74e2b672053e3296bc814a36988ba8463854f.zip
Workout records are now written to the database
Diffstat (limited to 'app/templates/workout/record.html')
-rw-r--r--app/templates/workout/record.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html
index d7e29f8..aa58ff4 100644
--- a/app/templates/workout/record.html
+++ b/app/templates/workout/record.html
@@ -3,10 +3,10 @@
{% block title %}Record {{ workout.name }}{% endblock %}
{% block form %}
-{% for exercise in workout.exercises %}
-{% set outer_loop = loop %}
+{% for exercise in form.exercises.entries %}
<div>
- <h1 id="{{ exercise.name }}" class="title is-4 has-text-black">{{ exercise.name }}</h1>
+ {{ exercise['id'] }}
+ <h1 class="title is-4 has-text-black">{{ workout.exercises[loop.index0].name }}</h1>
<table class="table is-fullwidth is-hoverable">
<thead>
<th>Set</th>
@@ -15,11 +15,11 @@
<th>Done</th>
</thead>
<tbody>
- {% for i in range(exercise.sets) %}
+ {% for set in exercise.sets.entries %}
<tr>
- <th>{{ i + 1 }}</th>
- <td><input class="input" name="exercises-{{ outer_loop.index0 }}-sets-{{ i }}-lbs" type="number"></td>
- <td><input class="input" name="exercises-{{ outer_loop.index0 }}-sets-{{ i }}-reps" type="number"></td>
+ <th>{{ loop.index }}</th>
+ <td>{{ set['lbs'](class_='input') }}</td>
+ <td>{{ set['units'](class_='input') }}</td>
<td>
<a class="button" onClick="onClickSetCheck(this)">
<span class="icon is-small">