improved #480
This commit is contained in:
@@ -66,9 +66,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>{{ team.name }} Join Workouts</h1>
|
<h1>{{ team.name }} Glue Workouts</h1>
|
||||||
|
|
||||||
<ul class="main-content">
|
<ul class="main-content">
|
||||||
|
<li class="grid_4 maxheight">
|
||||||
|
{% if team %}
|
||||||
|
<form id="searchform" action="/rowers/workouts-join-select/team/{{ team.id }}/"
|
||||||
|
method="get" accept-charset="utf-8">
|
||||||
|
{% else %}
|
||||||
|
<form id="searchform" action="/rowers/workouts-join-select/"
|
||||||
|
method="get" accept-charset="utf-8">
|
||||||
|
{% endif %}
|
||||||
|
{{ searchform }}
|
||||||
|
<input type="submit" value="GO"></input>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
<li class="grid_2 maxheight">
|
<li class="grid_2 maxheight">
|
||||||
<form enctype="multipart/form-data" action="/rowers/workouts-join/" method="post">
|
<form enctype="multipart/form-data" action="/rowers/workouts-join/" method="post">
|
||||||
{% if workouts %}
|
{% if workouts %}
|
||||||
@@ -96,45 +108,17 @@
|
|||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
{% if team %}
|
<form enctype="multipart/form-data" action="" method="post">
|
||||||
<form enctype="multipart/form-data" action="/rowers/workouts-join-select/team/{{ team.id }}/" method="post">
|
<table>
|
||||||
{% else %}
|
{{ dateform.as_table }}
|
||||||
<form enctype="multipart/form-data" action="/rowers/workouts-join-select/" method="post">
|
</table>
|
||||||
{% endif %}
|
<table>
|
||||||
<table>
|
{{ modalityform.as_table }}
|
||||||
{{ dateform.as_table }}
|
</table>
|
||||||
</table>
|
<p>
|
||||||
<p>
|
{% csrf_token %}
|
||||||
{% csrf_token %}
|
<input name='modalityform' type="submit" value="Filter Workouts">
|
||||||
<input name='daterange' type="submit" value="Submit">
|
</p>
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% if team %}
|
|
||||||
<form enctype="multipart/form-data" action="/rowers/workouts-join-select/team/{{ team.id }}/" method="post">
|
|
||||||
{% else %}
|
|
||||||
<form enctype="multipart/form-data" action="/rowers/workouts-join-select/" method="post">
|
|
||||||
{% endif %}
|
|
||||||
<table>
|
|
||||||
{{ modalityform.as_table }}
|
|
||||||
</table>
|
|
||||||
<p>
|
|
||||||
{% csrf_token %}
|
|
||||||
<input name='modalityform' type="submit" value="Submit">
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
<li class="grid_2">
|
|
||||||
{% if team %}
|
|
||||||
<form id="searchform" action="/rowers/workouts-join-select/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
|
||||||
method="get" accept-charset="utf-8">
|
|
||||||
{% else %}
|
|
||||||
<form id="searchform" action="/rowers/workouts-join-select/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
|
||||||
method="get" accept-charset="utf-8">
|
|
||||||
{% endif %}
|
|
||||||
{{ searchform }}
|
|
||||||
<input type="submit" value="GO"></input>
|
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
@@ -224,8 +224,8 @@ urlpatterns = [
|
|||||||
re_path(r'^user-boxplot-select/user/(?P<userid>\d+)/$',views.user_boxplot_select,name='user_boxplot_select'),
|
re_path(r'^user-boxplot-select/user/(?P<userid>\d+)/$',views.user_boxplot_select,name='user_boxplot_select'),
|
||||||
re_path(r'^user-boxplot-select/$',views.user_boxplot_select,name='user_boxplot_select'),
|
re_path(r'^user-boxplot-select/$',views.user_boxplot_select,name='user_boxplot_select'),
|
||||||
re_path(r'^user-analysis-select/(?P<function>\w.*)/user/(?P<userid>\d+)/$',views.analysis_new,name='analysis_new'),
|
re_path(r'^user-analysis-select/(?P<function>\w.*)/user/(?P<userid>\d+)/$',views.analysis_new,name='analysis_new'),
|
||||||
re_path(r'^user-analysis-select/user/(?P<userid>\d+)/$',views.analysis_new,name='analysis_new'),
|
|
||||||
re_path(r'^user-analysis-select/(?P<function>\w.*)/team/(?P<teamid>\d+)/$',views.analysis_new,name='analysis_new'),
|
re_path(r'^user-analysis-select/(?P<function>\w.*)/team/(?P<teamid>\d+)/$',views.analysis_new,name='analysis_new'),
|
||||||
|
re_path(r'^user-analysis-select/user/(?P<userid>\d+)/$',views.analysis_new,name='analysis_new'),
|
||||||
re_path(r'^user-analysis-select/team/(?P<teamid>\d+)/$',views.analysis_new,name='analysis_new'),
|
re_path(r'^user-analysis-select/team/(?P<teamid>\d+)/$',views.analysis_new,name='analysis_new'),
|
||||||
re_path(r'^user-analysis-select/(?P<function>\w.*)/$',views.analysis_new,name='analysis_new'),
|
re_path(r'^user-analysis-select/(?P<function>\w.*)/$',views.analysis_new,name='analysis_new'),
|
||||||
re_path(r'^user-analysis-select/$',views.analysis_new,name='analysis_new'),
|
re_path(r'^user-analysis-select/$',views.analysis_new,name='analysis_new'),
|
||||||
|
|||||||
@@ -479,8 +479,9 @@ def workouts_join_select(request,
|
|||||||
modalities = [m[0] for m in mytypes.workouttypes]
|
modalities = [m[0] for m in mytypes.workouttypes]
|
||||||
modality = 'all'
|
modality = 'all'
|
||||||
|
|
||||||
if request.method == 'POST' and 'daterange' in request.POST:
|
if request.method == 'POST':
|
||||||
dateform = DateRangeForm(request.POST)
|
dateform = DateRangeForm(request.POST)
|
||||||
|
modalityform = TrendFlexModalForm(request.POST)
|
||||||
if dateform.is_valid():
|
if dateform.is_valid():
|
||||||
startdate = dateform.cleaned_data['startdate']
|
startdate = dateform.cleaned_data['startdate']
|
||||||
enddate = dateform.cleaned_data['enddate']
|
enddate = dateform.cleaned_data['enddate']
|
||||||
@@ -488,15 +489,6 @@ def workouts_join_select(request,
|
|||||||
enddatestring = enddate.strftime('%Y-%m-%d')
|
enddatestring = enddate.strftime('%Y-%m-%d')
|
||||||
request.session['startdate'] = startdatestring
|
request.session['startdate'] = startdatestring
|
||||||
request.session['enddate'] = enddatestring
|
request.session['enddate'] = enddatestring
|
||||||
else:
|
|
||||||
dateform = DateRangeForm(initial={
|
|
||||||
'startdate':startdate,
|
|
||||||
'enddate':enddate,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
if request.method == 'POST' and 'modality' in request.POST:
|
|
||||||
modalityform = TrendFlexModalForm(request.POST)
|
|
||||||
if modalityform.is_valid():
|
if modalityform.is_valid():
|
||||||
modality = modalityform.cleaned_data['modality']
|
modality = modalityform.cleaned_data['modality']
|
||||||
waterboattype = modalityform.cleaned_data['waterboattype']
|
waterboattype = modalityform.cleaned_data['waterboattype']
|
||||||
@@ -511,6 +503,13 @@ def workouts_join_select(request,
|
|||||||
|
|
||||||
request.session['modalities'] = modalities
|
request.session['modalities'] = modalities
|
||||||
request.session['waterboattype'] = waterboattype
|
request.session['waterboattype'] = waterboattype
|
||||||
|
else:
|
||||||
|
dateform = DateRangeForm(initial={
|
||||||
|
'startdate':startdate,
|
||||||
|
'enddate':enddate,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
negtypes = []
|
negtypes = []
|
||||||
for b in mytypes.boattypes:
|
for b in mytypes.boattypes:
|
||||||
|
|||||||
Reference in New Issue
Block a user