Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Use the form_snippet

Roland Geiderb2e9c580a3e8
diff --git a/manager/templates/day/edit.html b/manager/templates/day/edit.html
index 4c954b241..cd3ebf46a 100644
--- a/manager/templates/day/edit.html
+++ b/manager/templates/day/edit.html
@@ -14,14 +14,19 @@
<h2>{% trans "Edit" %} {{ day.description }}</h2>
-{% if day.id %}
-<form action="/workout/{{ workout.id}}/edit/day/{{ day.id }}" method="post">
-{% else %}
-<form action="/workout/{{ workout.id}}/edit/day/" method="post">
-{% endif %}
- {% csrf_token %}
- {{ day_form.as_p }}
- <input type="submit" value="{% trans "Save" %}" />
+<form action="/workout/{{ workout.id}}/edit/day/{% if day.id %}{{ day.id }}{% endif %}"
+ method="post"
+ class="ym-form">
+{% csrf_token %}
+{{ day_form.non_field_errors }}
+<table>
+ {% include "form_snippet.html" with field=day_form.description %}
+ {% include "form_snippet.html" with field=day_form.day css_class="ym-fbox-select" %}
+ <tr>
+ <td><input type="submit" value="{% trans "Save" %}" /></td>
+ <td></td>
+ </tr>
+</table>
</form>