summaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-04-24 19:45:07 -0500
committerstilbruch <stilbruch@protonmail.com>2022-04-24 19:45:07 -0500
commit0bcfd4a9a26d66af8a44ff36686b54ad2572d9e1 (patch)
treeba6d035a835c2451427a46d29b30c85898dd398d /app/templates
parent0dd74e2b672053e3296bc814a36988ba8463854f (diff)
downloadStrengthy-0bcfd4a9a26d66af8a44ff36686b54ad2572d9e1.tar.xz
Strengthy-0bcfd4a9a26d66af8a44ff36686b54ad2572d9e1.zip
Fix workout creation and editing
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/workout/create.html22
1 files changed, 17 insertions, 5 deletions
diff --git a/app/templates/workout/create.html b/app/templates/workout/create.html
index a84b457..1f6d136 100644
--- a/app/templates/workout/create.html
+++ b/app/templates/workout/create.html
@@ -1,6 +1,12 @@
{% extends 'base/form.html' %}
-{% block title %}Create Workout{% endblock %}
+{% block title %}
+ {% if workout %}
+ Edit {{ workout.name }}
+ {% else %}
+ Create Workout
+ {% endif %}
+{% endblock %}
{% block form %}
<div class="field is-horizontal">
@@ -18,7 +24,9 @@
<div id="rows" class="field">
{% for entry in form.exercises.entries %}
- {{ entry['id']() }}
+ {% if workout %}
+ {{ entry['id']() }}
+ {% endif %}
<div class="field is-horizontal">
<div class="field-body">
<div class="field">
@@ -73,10 +81,14 @@
<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 class="icon is-small"><i class="fa fa-check"></i></span>
+ <span>
+ {% if workout %}
+ Save Changes
+ {% else %}
+ Create Workout
+ {% endif %}
</span>
- <span>Create Workout</span>
</button>
</div>