You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cqtu/templates/contest/uploadCBR.html

82 lines
2.0 KiB

{% extends "base.html" %}
{% load crispy_forms_tags %}
{% block content %}
{% if not deadline %}
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Upload cabrillo data</div>
<div class="panel-body">
{# {% crispy form %} #}
<form method="post" action="{% url 'contest:uploadCBR' %}">
{% csrf_token %}
{{ form | crispy }}
<div class="form-action">
<button class="btn btn-danger" type="submit" name="action" value="save">Save</button>
<button class="btn btn-success" type="submit" name="action" value="verify">Verify</button>
<p>
<strong>Note:</strong> On clicking save your QSOs will be saved to the database and you will have
to use the log form to verify and edit your data!
</p>
<p>
<strong>Note:</strong> QSOs marked red in the verify phase will not be saved.
</p>
{% if save and not saved %}
<p class="danger">
Could not save, as your data still contains errors!
</p>
{% endif %}
</div>
</form>
{% if verifyErrors %}
<div class="alert alert-danger">
<ul>
{% for error in verifyErrors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<table class="table">
<thead>
<tr>
<th>QSO</th>
<th>Error</th>
</tr>
</thead>
<tbody>
{% for qso, qsoForm in verifyData %}
<tr class="{% if qsoForm.errors %}danger{% else %}success{% endif %}">
<td>{{ qso }}</td>
<td>{{ qsoForm.errors }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-sm-6 col-sm-offset-3">
<div class="panel panel-danger">
<div class="panel-heading">Upload closed</div>
<div class="panel-body">
<p>
The deadline for this contest has passed.
Uploading cabrillo files is not possible anymore.
</p>
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}