cqtu/templates/contest/uploadCBR.html

83 lines
2.0 KiB
HTML

{% 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 %}
{% if verifyData %}
<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>
{% endif %}
</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 %}