Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Use the form_snippet on the sets form

Roland Geider75329f3576f0
diff --git a/manager/templates/set/edit.html b/manager/templates/set/edit.html
index b93035cd6..cf644eaef 100644
--- a/manager/templates/set/edit.html
+++ b/manager/templates/set/edit.html
@@ -14,14 +14,20 @@
<h2>{% trans "Edit" %} {{ day.description }}</h2>
-{% if set.id %}
-<form action="/workout/{{ workout.id}}/day/{{ day.id }}/edit/set/{{ set.id }}" method="post">
-{% else %}
-<form action="/workout/{{ workout.id}}/day/{{ day.id }}/edit/set/" method="post">
-{% endif %}
+<form action="/workout/{{ workout.id}}/day/{{ day.id }}/edit/set/{% if set.id %}{{ set.id }}{% endif %}"
+ method="post"
+ class="ym-form">
+<table>
{% csrf_token %}
- {{ set_form.as_p }}
- <input type="submit" value="{% trans "Save" %}" />
+ {% include "form_snippet.html" with field=set_form.exercises css_class="ym-fbox-select" %}
+ {% include "form_snippet.html" with field=set_form.order %}
+ {% include "form_snippet.html" with field=set_form.sets %}
+
+ <tr>
+ <td><input type="submit" value="{% trans "Save" %}" /></td>
+ <td></td>
+ </tr>
+</table>
</form>