diff --git a/helios/forms.py b/helios/forms.py index b1d6687fda8534bb076007007f84a595730ea82c..eccb04a2598b96b5a650e0e1b2ad7ce5b6ace229 100644 --- a/helios/forms.py +++ b/helios/forms.py @@ -34,9 +34,9 @@ class ElectionForm(forms.Form): # v DB se ukládá naivnĂ UTC, ale do formuláře potĹ™ebujeme pĹ™evĂ©st zpÄ›t na Europe/Prague if data: tz = pytz.timezone("Europe/Prague") - if "voting_starts_at" in data: + if "voting_starts_at" in data and data["voting_starts_at"]: data["voting_starts_at"] = make_naive(make_aware(data["voting_starts_at"], pytz.UTC), tz) - if "voting_ends_at" in data: + if "voting_ends_at" in data and data["voting_ends_at"]: data["voting_ends_at"] = make_naive(make_aware(data["voting_ends_at"], pytz.UTC), tz) super().__init__(data, *args, **kwargs) diff --git a/helios/media/static_templates/question.html b/helios/media/static_templates/question.html index fe6709f7faf52b38111d13913315dac4a68078eb..b3de687e39a0bc69bfe1cec9f420e6eb57b9af79 100644 --- a/helios/media/static_templates/question.html +++ b/helios/media/static_templates/question.html @@ -27,8 +27,8 @@ <input type="hidden" name="choice_type" value="approval" /> <b>{$T.question$index + 1}.</b> Zvolte mezi <select name="min"> - <option>0</option> - <option selected>1</option> + <option selected>0</option> + <option>1</option> {#for option_index = 2 to 20} <option>{$T.option_index}</option> {#/for} @@ -37,7 +37,6 @@ a <select name="max"> - <option>0</option> <option selected>1</option> {#for option_index = 2 to 50} <option>{$T.option_index}</option> @@ -95,8 +94,8 @@ zatĂm žádnĂ© otázky <input type="hidden" name="choice_type" value="approval" /> Zvolte mezi <select name="min"> - <option>0</option> - <option selected>1</option> + <option selected>0</option> + <option>1</option> {#for option_index = 2 to 20} <option>{$T.option_index}</option> {#/for} @@ -105,7 +104,6 @@ zatĂm žádnĂ© otázky a <select name="max"> - <option>0</option> <option selected>1</option> {#for option_index = 2 to 50} <option>{$T.option_index}</option> diff --git a/helios/templates/election_view.html b/helios/templates/election_view.html index 6617500603328778cfc4527d893bb32c23e6f411..44fbff9c84e3b9f9e49a659d2fc1a2ca75a632f2 100644 --- a/helios/templates/election_view.html +++ b/helios/templates/election_view.html @@ -48,7 +48,7 @@ toto {{election.election_type}} <u>nenĂ</u> zobrazeno na titulnĂ stránce. </div> <p> -{% if election.help_email and admin_p%}Email pro nápovÄ›du: {{election.help_email}}<br />{% endif %} +{# {% if election.help_email and admin_p%}Email pro nápovÄ›du: {{election.help_email}}<br />{% endif %} #} {% if election.voting_start_at %}HlasovánĂ zaÄŤĂná: {{election.voting_start_at|timezone:"Europe/Prague"}}<br />{% endif %} {% if election.voting_end_at %}HlasovánĂ konÄŤĂ: {{election.voting_end_at|timezone:"Europe/Prague"}}<br />{% endif %} </p> @@ -159,7 +159,7 @@ PotĂ© uvidĂte vĂ˝sledek pouze vy jakoĹľto zakladatel hlasovánĂ. {% if show_result %} {% if election.result_released_at %} <span class="highlight-box round"> -Toto hlasovánĂ bylo ukonÄŤeno. VĂ˝sledek byl zveĹ™ejnÄ›n {{election.result_released_at|timezone:"Europe/Prague"}}. Celkem bylo odevzdáno {{election.num_cast_votes}} hlasĹŻ. +Toto hlasovánĂ bylo ukonÄŤeno. VĂ˝sledek byl zveĹ™ejnÄ›n {{election.result_released_at|timezone:"Europe/Prague"}}. Celkem hlasovalo {{election.num_cast_votes}} voliÄŤĹŻ. </span><br /><br /><br /> {% endif %} @@ -256,7 +256,7 @@ V tomto hlasovánĂ mĹŻĹľe hlasovat kdokoli. {% endif %} {% if admin_p and election.voting_ends_at and not election.tallying_started_at %} -<br /><a href="{% url "election@extend" election.uuid %}">extend voting</a><br /> +<br /><a href="{% url "election@extend" election.uuid %}">prodlouĹľit hlasovánĂ</a><br /> {% endif %} <div style="background: lightyellow; padding:5px; padding-left: 10px; margin-top: 15px; border: 1px solid #aaa; width: 720px;" class="round"> diff --git a/helios/templates/elections_administered.html b/helios/templates/elections_administered.html index 366147f4325ad56a0c35a05785065ae1f4f1f71c..a3d623e43361aa84d62478333bd450cf8a9e291d 100644 --- a/helios/templates/elections_administered.html +++ b/helios/templates/elections_administered.html @@ -1,7 +1,7 @@ {% extends TEMPLATE_BASE %} {% block content %} - <h2 class="title">HlasovánĂ, která spravujete <span style="font-size:0.7em;">[<a href="/">zpÄ›t na ĂşvodnĂ stránku</a>]</span></h2> + <h2 class="title">HlasovánĂ, která spravujete <span style="font-size:0.7em;">[<a href="/">zpÄ›t na Ăşvod</a>]</span></h2> <ul> {% for election in elections %} diff --git a/helios/templates/elections_voted.html b/helios/templates/elections_voted.html index 08effff233bfd68720b0d0845a9e78a567b029fd..abd4330f803599549a38d93510b7db04988bec59 100644 --- a/helios/templates/elections_voted.html +++ b/helios/templates/elections_voted.html @@ -1,7 +1,7 @@ {% extends TEMPLATE_BASE %} {% block content %} - <h2 class="title">HlasovánĂ, v nichĹľ jste hlasoval <span style="font-size:0.7em;">[<a href="/">zpÄ›t na ĂşvodnĂ stránku</a>]</span></h2> + <h2 class="title">HlasovánĂ, v nichĹľ jste oprávnÄ›n/a hlasovat <span style="font-size:0.7em;">[<a href="/">zpÄ›t na Ăşvod</a>]</span></h2> <ul> {% for election in elections %} diff --git a/helios/templates/email/info_body.txt b/helios/templates/email/info_body.txt index 2a0b68cd876bce342f6f440972d4c513efb9f699..01f1b32631d2aad4f602fe34fb6980ecd32c29eb 100644 --- a/helios/templates/email/info_body.txt +++ b/helios/templates/email/info_body.txt @@ -2,7 +2,7 @@ VáženĂ˝ {{voter.name}}, {{custom_message|safe}} -Odkaz na volby: {{election_vote_url}} +Odkaz na volby: {{election_url}} -- Helios diff --git a/helios/templates/email/result_body.txt b/helios/templates/email/result_body.txt index fc71cc972d0e96fab09a953215bd7c398a3b6796..5b071d7631f2f7213f1dea73bde05a660af2b407 100644 --- a/helios/templates/email/result_body.txt +++ b/helios/templates/email/result_body.txt @@ -12,7 +12,7 @@ CelkovĂ˝ vĂ˝sledek pro {{election.name}} byl vypoÄŤĂtán a zveĹ™ejnÄ›n: Pokud myslĂte Ĺľe tento sledovaÄŤ je chybnĂ˝, prosĂm kontaktuje nás. {% else %} -Vyoadá to, Ĺľe v tÄ›chto volbách jste nehlasovali. +Vypadá to, Ĺľe v tÄ›chto volbách jste nehlasovali. ProsĂm kontaktujte nás, pokud si myslĂte, Ĺľe ano. {% endif %} -- diff --git a/helios/templates/email/simple_body.txt b/helios/templates/email/simple_body.txt index 560ff7b1adc31467c93501d003b191ad96fbbe13..79fba544dc9651f23fa4a615c733afcb5789de40 100644 --- a/helios/templates/email/simple_body.txt +++ b/helios/templates/email/simple_body.txt @@ -5,10 +5,10 @@ VáženĂ˝ {{voter.name}}, ======== Jak hlasovat -URL HlasovánĂ: {{election_vote_url}} +URL HlasovánĂ: {{election_url}} {% ifequal voter.voter_type "password" %} Vaše ID voliÄŤe: {{voter.voter_login_id}} Vaše heslo: {{voter.voter_password}} {% else %} -PĹ™ihlašte se svĂ˝m {{voter.voter_type}} účtem. +PĹ™ihlaste se svou pirátskou identitou. {% endifequal %} diff --git a/helios/templates/email/vote_body.txt b/helios/templates/email/vote_body.txt index 6e42d0873eb48f6ee183248930307efebb3008a1..12e0a880c6a407630a13438a96148a3a6baaeb7f 100644 --- a/helios/templates/email/vote_body.txt +++ b/helios/templates/email/vote_body.txt @@ -3,25 +3,25 @@ VáženĂ˝ {{voter.name}}, {{custom_message|safe}} -URL HlasovánĂ: {{election_vote_url}} -Otisk HlasovánĂ©: {{voter.election.hash}} -{% if election.voting_start_at %}HlasovánĂ zaÄŤĂná {{election.voting_start_at|timezone:"Europe/Prague"}} -{% endif %}{% if election.voting_end_at %}HlasovánĂ konÄŤĂ {{election.voting_end_at|timezone:"Europe/Prague"}} +URL hlasovánĂ: {{election_url}} +Otisk hlasovánĂ: {{voter.election.hash}} +{% if election.voting_start_at %}HlasovánĂ zaÄŤĂná: {{election.voting_start_at|timezone:"Europe/Prague"}} +{% endif %}{% if election.voting_end_at %}HlasovánĂ konÄŤĂ: {{election.voting_end_at|timezone:"Europe/Prague"}} {% endif %} {% ifequal voter.voter_type "password" %} Vaše ID voliÄŤe: {{voter.voter_login_id}} Vaše heslo: {{voter.voter_password}} {% else %} -PĹ™ihlašte se svĂ˝m {{voter.voter_type}} účtem. +PĹ™ihlaste se svou pirátskou identitou. {% endifequal %}{% if voter.vote_hash %} -Zaznamenali jsem váš hlas chytrĂ˝m sledovaÄŤem: +Zaznamenali jsme váš hlas chytrĂ˝m sledovaÄŤem: {{voter.vote_hash}} -MĹŻĹľete kdykoli znovu hlasovat: pouze poslednĂ hlas se poÄŤĂtá. +MĹŻĹľete kdykoli znovu hlasovat, pouze poslednĂ hlas se poÄŤĂtá. {% endif %}{% if election.use_voter_aliases %} -Z dĹŻvodĹŻ ochrany vašeho soukromĂ, toto hlasovánĂ je nastaveno +Z dĹŻvodĹŻ ochrany vašeho soukromĂ je toto hlasovánĂ nastaveno, aby nikdy nezobrazovalo veĹ™ejnÄ› Vaše login, ID voliÄŤe, jmĂ©no, nebo email. Centrum sledovánĂ lĂstkĹŻ bude zobrazovat pouze váš alias. diff --git a/helios/templates/list_trustees.html b/helios/templates/list_trustees.html index 5e3f1e345d6b02fa2f078fb570bc3144bfc1e2dd..a1905b64d211027362290f945fb90e72fb8bfc54 100644 --- a/helios/templates/list_trustees.html +++ b/helios/templates/list_trustees.html @@ -50,22 +50,21 @@ <p> {% if t.public_key_hash %} - Otisk veĹ™ejnĂ©ho klĂÄŤe: <tt style="font-size:1.5em;">{{t.public_key_hash}}</tt> + Otisk veĹ™ejnĂ©ho klĂÄŤe: <tt style="font-size:1.3em;">{{t.public_key_hash}}</tt> {% else %} VeĹ™ejnĂ˝ klĂÄŤ ještÄ› nebyl nahrán. {% endif %} -</p> {% if election.encrypted_tally %} {% if t.decryption_factors %} -<b>Tento trustee jiĹľ dešifroval vĂ˝sledek.</b> +<br><b>Tento trustee jiĹľ dešifroval vĂ˝sledek.</b> {% else %} -<em>ÄŚekáme na dĂlÄŤĂ dešifrovánĂ vĂ˝sledku.</em> +<br><em>ÄŚekáme na dĂlÄŤĂ dešifrovánĂ vĂ˝sledku.</em> {% endif %} {% endif %} -</li> +</p> +<br> {% endfor %} -</ul> {% endif %} diff --git a/heliosbooth/templates/question.html b/heliosbooth/templates/question.html index ac43b726891d3baefd44bc422068af9fc7176e77..f1eeb791cfa67e3346ac3417adef34a98c674a13 100644 --- a/heliosbooth/templates/question.html +++ b/heliosbooth/templates/question.html @@ -10,15 +10,15 @@ zvolte {#if $T.question.min && $T.question.min > 0} {#if $T.question.max} -od {$T.question.min} do {$T.question.max} moĹľnostĂ + od {$T.question.min} do {$T.question.max} moĹľnostĂ {#else} -nejmĂ©nÄ› {$T.question.min} moĹľnosti + nejmĂ©nÄ› {$T.question.min} moĹľnosti {#/if} {#else} {#if $T.question.max} -{#if $T.question.max > 1} nejvýše {#/if}{$T.question.max} moĹľnosti + nejvýše {$T.question.max} moĹľnosti {#else} -libovolnĂ˝ poÄŤet moĹľnostĂ + libovolnĂ˝ poÄŤet moĹľnostĂ {#/if} {#/if} </span> diff --git a/server_ui/templates/index.html b/server_ui/templates/index.html index 54a4ef807322f60fa77aca25c4119cda6d85607a..a8be249f2789ab0bbb6a20af47b5d3b65e7c1817 100644 --- a/server_ui/templates/index.html +++ b/server_ui/templates/index.html @@ -75,7 +75,7 @@ More than <b>2,000,000 votes</b> have been cast using Helios. <div class="row"></div> {% endif %} -<h5 class="subheader">Naposledy hlasováno v</h5> +<h5 class="subheader">Vaše hlasovánĂ</h5> {% if elections_voted %} <ul> {% for election in elections_voted %}