Skip to content

Commit 60992cd

Browse files
committed
Use form submission component for public scoresheet
This will make the form disable during saving, so should avoid duplicate submissions.
1 parent a38f28a commit 60992cd

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

tabbycat/results/templates/public_enter_results.html

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040
{% csrf_token %}
4141
{% include "ballot/ballot_set.html" %}
4242

43-
4443
<div class="card mt-3">
45-
<div class="card-body">
46-
{# Password isn't always used. #}
47-
{% if form.password %}
44+
{% if form.password %}
45+
{# Password isn't always used. #}
46+
<div class="list-group-item pt-3 pb-4">
4847
<div class="form-group">
4948
<label for="{{ form.password.id_for_label }}">{{ form.password.label }}</label>
5049
<div class="col-sm-9 col-md-6">
@@ -56,26 +55,22 @@
5655
{% endif %}
5756
</div>
5857
</div>
59-
{% endif %}
58+
</div>
59+
{% endif %}
60+
6061
<input id="id_debate_result_status" type="hidden" name="debate_result_status" value="{{ debate.STATUS_DRAFT }}" />
6162
<input id="id_discarded" type="hidden" name="discarded" />
6263
<input id="id_confirmed" type="hidden" name="confirmed" />
63-
{% blocktranslate trimmed count counter=form.scoresheets|length asvar button_text %}
64+
65+
{% blocktranslate trimmed count counter=form.scoresheets|length asvar title %}
6466
Submit Ballot
6567
{% plural %}
6668
Submit Ballots
6769
{% endblocktranslate %}
68-
<input class="save btn btn-success btn-block " type="submit" value="{{ button_text }}" tabindex="{{ form.nexttabindex }}"/>
69-
<div class="text-center pt-3 small text-muted">
70-
{% trans "When submitting this form your IP address will be stored for logging purposes." %}
71-
{% if pref.enable_ballot_receipts %}
72-
<br />
73-
{% trans "Emails will be sent to adjudicators when the ballot is confirmed." %}
74-
{% endif %}
75-
</div>
76-
</div>
77-
</div>
70+
{% trans "When submitting this form your IP address will be stored for logging purposes." as subtitle %}
71+
{% include "components/form-submit.html" %}
7872

73+
</div>
7974
</form>
8075
{% endblock content %}
8176

0 commit comments

Comments
 (0)