summaryrefslogtreecommitdiff
path: root/app/templates/workout
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-04-24 17:59:31 -0500
committerstilbruch <stilbruch@protonmail.com>2022-04-24 17:59:31 -0500
commit586285028845c8ed9a2e859f1266c233b8278311 (patch)
tree8a19025a0f2c9e1c2c9e93fce027fdfd02d5e821 /app/templates/workout
parent7c9c647f0e22c42bcce8845f5d49808014d39d96 (diff)
downloadStrengthy-586285028845c8ed9a2e859f1266c233b8278311.tar.xz
Strengthy-586285028845c8ed9a2e859f1266c233b8278311.zip
Fix backend for workout editing
Diffstat (limited to 'app/templates/workout')
-rw-r--r--app/templates/workout/create.html1
-rw-r--r--app/templates/workout/record.html14
2 files changed, 13 insertions, 2 deletions
diff --git a/app/templates/workout/create.html b/app/templates/workout/create.html
index 292aaa8..333aca6 100644
--- a/app/templates/workout/create.html
+++ b/app/templates/workout/create.html
@@ -18,6 +18,7 @@
<div id="rows" class="field">
{% for entry in form.exercises.entries %}
+ {{ entry['id']() }}
<div class="field is-horizontal">
<div class="field-body">
<div class="field">
diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html
index d1662e3..d7e29f8 100644
--- a/app/templates/workout/record.html
+++ b/app/templates/workout/record.html
@@ -4,6 +4,7 @@
{% block form %}
{% for exercise in workout.exercises %}
+{% set outer_loop = loop %}
<div>
<h1 id="{{ exercise.name }}" class="title is-4 has-text-black">{{ exercise.name }}</h1>
<table class="table is-fullwidth is-hoverable">
@@ -17,8 +18,8 @@
{% for i in range(exercise.sets) %}
<tr>
<th>{{ i + 1 }}</th>
- <td><input class="input" type="number"></td>
- <td><input class="input" type="number"></td>
+ <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>
<td>
<a class="button" onClick="onClickSetCheck(this)">
<span class="icon is-small">
@@ -42,6 +43,15 @@
</div>
{% endfor %}
+<div class="field is-horizontal is-grouped is-grouped-right">
+ <button class="button is-success ">
+ <span class="icon is-small">
+ <i class="fa fa-check"></i>
+ </span>
+ <span>Finish Workout</span>
+ </button>
+</div>
+
<script async type="text/javascript" src="/static/js/record.js"></script>
{% endblock %}