Private
Public Access
1
0

withdraw from race

This commit is contained in:
Sander Roosendaal
2020-05-23 16:00:04 +02:00
parent 248276ddcf
commit 3159526e64
7 changed files with 353 additions and 2 deletions

View File

@@ -114,7 +114,7 @@
</h1>
<p>
Please select a reason and add a comment (mandatory).
Pressing 'Reject' disqualifies the submitted result.
Pressing 'Reject' removes the submitted result.
An email will be sent to the rower. There is no "undo".
</p>
<p>

View File

@@ -313,6 +313,13 @@
&nbsp;
{% endif %}
</td>
<td>
{% if result.userid == request.user.rower.id and not race|is_final %}
<a href="/rowers/virtualevent/{{ race.id }}/withdrawresult/{{ result.id }}">
Remove
</a>
{% endif %}
</td>
</tr>
{% endfor %}
{% for result in dns %}

View File

@@ -0,0 +1,30 @@
{% extends "emailbase.html" %}
{% block body %}
<p>Dear <strong>{{ username }}</strong>,</p>
<p>
The result that you have submitted for the virtual challenge {{ racename }} has been
removed.
</p>
<p>
The reason for the removal was: <i>{{ reason }}</i>.
</p>
<p>
You added the following explanation:
<p>
<p>
<i>{{ message }}</i>
</p>
<p>
You are still registered for the challenge and can submit a result.
</p>
<p>
Best Regards, the Rowsandall Team
</p>
{% endblock %}

View File

@@ -0,0 +1,138 @@
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block scripts %}
{% include "monitorjobs.html" %}
{% endblock %}
{% block title %}{{ workout.name }} {% endblock %}
{% block og_title %}{{ workout.name }} {% endblock %}
{% block description %}{{ workout.name }}
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
{% block og_description %}{{ workout.name }}
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
{% if graphs1 %}
{% endif %}
{% for graph in graphs1 %}
{% block og_image %}
{% if graphs1 %}
{% for graph in graphs %}
<meta property="og:image" content="http://rowsandall.com/{{ graph.filename |spacetohtml }}" />
<meta property="og:image:secure_url" content="https://rowsandall.com/{{ graph.filename |spacetohtml }}" />
<meta property="og:image:width" content="{{ graph.width }}" />
<meta property="og:image:height" content="{{ graph.height }}" />
{% endfor %}
{% else %}
<meta property="og:image" content="http://rowsandall.com/static/img/logo_r.png" />
<meta property="og:image:secure_url" content="https://rowsandall.com/static/img/logo_r.png" />
{% endif %}
{% endblock %}
{% block image_src %}
{% for graph in graphs %}
<link rel="image_src" href="/{{ graph.filename |spacetohtml }}" />
{% endfor %}
{% endblock %}
{% endfor %}
{% block main %}
<h1>Do you want to withdraw this result?</h1>
<ul class="main-content">
<li class="grid_4">
<p>
Before you reject this challenge result, please carefully review it
using the information below. If you still want to reject the entry,
scroll down to the rejection form.
</p>
</li>
<li class="grid_2">
<table width=100%>
<tr>
<th>Rower:</th><td>{{ record.username }}</td>
</tr><tr>
<tr>
<th>Name:</th><td>{{ workout.name }}</td>
</tr><tr>
<tr>
<th>Date:</th><td>{{ workout.date }}</td>
</tr><tr>
<th>Time:</th><td>{{ workout.starttime }}</td>
</tr><tr>
<th>Distance:</th><td>{{ workout.distance }}m</td>
</tr><tr>
<th>Duration:</th><td>{{ workout.duration |durationprint:"%H:%M:%S.%f" }}</td>
</tr><tr>
<th>Type:</th><td>{{ workout.workouttype }}</td>
</tr><tr>
<th>Weight Category:</th><td>{{ workout.weightcategory }}</td>
</tr>
</table>
</li>
<li class="grid_2">
<h1>Workout Summary</h1>
<p>
<pre>
{{ workout.summary }}
</pre>
</p>
</li>
{% for graph in graphs %}
<li>
<a href="/rowers/graph/{{ graph.id }}/">
<img src="/{{ graph.filename }}"
onerror="this.src='/static/img/rowingtimer.gif'"
alt="{{ graph.filename }}" width="120" height="100">
</a>
</li>
{% endfor %}
{% if mapdiv %}
<li class="grid_2">
<div class="mapdiv">
{{ mapdiv|safe }}
{{ mapscript|safe }}
</div>
</li>
{% endif %}
<li class="grid_2">
<script src="https://cdn.pydata.org/bokeh/release/bokeh-1.0.4.min.js"></script>
<script async="true" type="text/javascript">
Bokeh.set_log_level("info");
</script>
{{ interactiveplot |safe }}
{{ the_div|safe }}
</li>
<li class="grid_4">
<h1>
Yes, I want to reject this entry
</h1>
<p>
Please select a reason and add a comment (mandatory).
Pressing 'Reject' removes the submitted result.
An email will be sent to the rower. There is no "undo".
</p>
<p>
<form enctype="multipart/form-date" action="" method="post">
<table>
{{ form.as_table }}
</table>
</p>
<p>
{% csrf_token %}
<input type="submit" value="Reject">
</p>
</form>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_racing.html' %}
{% endblock %}