Eos/eosweb/core/static/nunjucks/booth/cast_prepoll.html

58 lines
2.6 KiB
HTML

{% extends templates['booth/base.html'] %}
{#
Eos - Verifiable elections
Copyright © 2017-2021 RunasSudo (Yingtong Li)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% block content %}
<div class="ui negative message" style="clear: both;">
<p>Your vote has <span class="superem">not</span> yet been cast. Please follow the instructions to continue.</p>
</div>
{% if election.can_audit() %}
<p>Please make a note of your ballot fingerprint, <span class="hash">{{ eosjs.eos.core.hashing.SHA256().update_obj(ballot).hash_as_b64(true) }}</span>. Please retain a copy of your ballot fingerprint – you can use it to verify that your vote has been counted correctly. You may <a href="#" onclick="window.print();return false;">print this page</a> as a receipt if you wish.</p>
{% endif %}
<p>To continue, copy and paste the ballot below and provide it to the election administrator.</p>
<div class="ui form">
{# For some reason nunjucks doesn't like calling this the normal way #}
{% set ballot_deaudit = ballot.deaudit() %}
<textarea>{{ ballot_deaudit.to_json(ballot_deaudit.serialise_and_wrap(ballot_deaudit)) }}</textarea>
</div>
{% endblock %}
{% block buttons %}
<button class="ui left floated button" onclick="prevTemplate();">Back</a>
{% endblock %}
{% block after %}
{% if election.can_audit() %}
<div class="ui tiny message" style="margin-top: 3em;">
<div class="header">Information for advanced users</div>
<p>Your full ballot fingerprint is <span class="hash">{{ eosjs.eos.core.hashing.SHA256().update_obj(ballot).hash_as_b64() }}</span>.</p>
</div>
{% endif %}
{% endblock %}
{% block help %}
<p>You are now ready to cast your ballot. As this is a pre-poll voting booth, you must manually provide your ballot to the election administrator.</p>
<p>Copy and paste the entire text of the ballot shown in the textbox into a message to the election administrator.</p>
<p>Click the ‘OK’ button below to close this help screen.</p>
<p>If you require further assistance, contact your election administrator.</p>
{% endblock %}