simple config page (working)
This commit is contained in:
@@ -18,17 +18,16 @@
|
||||
{% endif %}
|
||||
<div class-"grid_12 alpha">
|
||||
<h1>Workflow Page Configuration</h1>
|
||||
<p>On this page, you can configure the content of your "Workflow" page
|
||||
for each workout. If you want to remove an element, change it to "None".
|
||||
You can add one new element at a time.</p>
|
||||
<div class="grid_6 alpha">
|
||||
<h2>Left Panel</h2>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
{{ leftpanel_formset.management_form }}
|
||||
{% for leftpanel_form in leftpanel_formset %}
|
||||
<div class="leftpanel-formset grid_5 alpha">
|
||||
<table>
|
||||
{{ leftpanel_form.as_table }}
|
||||
{{ leftpanel_formset.as_table }}
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% csrf_token %}
|
||||
<input class="grid_2 alpha button green" type="submit" value="Save">
|
||||
</form>
|
||||
@@ -38,13 +37,9 @@
|
||||
<h2>Middle Panel</h2>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
{{ middlepanel_formset.management_form }}
|
||||
{% for middlepanel_form in middlepanel_formset %}
|
||||
<div class="middlepanel-formset grid_5 alpha">
|
||||
<table>
|
||||
{{ middlepanel_form.as_table }}
|
||||
{{ middlepanel_formset.as_table }}
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% csrf_token %}
|
||||
<input class="grid_2 alpha button green" type="submit" value="Save">
|
||||
</form>
|
||||
@@ -52,19 +47,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Include formset plugin - including jQuery dependency -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||
<script src="/static/js/jquery.formset.js"></script>
|
||||
<script>
|
||||
$('.leftpanel-formset').formset({
|
||||
addText: '<div class="button grid_2 alpha green small">add element</div>',
|
||||
deleteText: '<div class="button grid_2 alpha red small">remove</div>'
|
||||
});
|
||||
$('.middlepanel-formset').formset({
|
||||
addText: '<div class="button grid_2 alpha green small">add element</div>',
|
||||
deleteText: '<div class="button grid_2 alpha red small">remove</div>'
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user