decide.nolog.cz/app/templates/poll-error.hbs
jelhan 17cfb4ab6d
Meaningful error pages (#177)
Adds meaningful error pages if
- poll does not exist
- encryption key is wrong.
2019-04-23 17:37:42 +02:00

32 lines
No EOL
755 B
Handlebars

<div class="box">
{{#if decryptionFailed}}
<h2 data-test-error-type="decryption-failed">
{{t "error.poll.decryptionFailed.title"}}
</h2>
<p>
{{t "error.poll.decryptionFailed.description"}}
</p>
{{else if notFound}}
<h2 data-test-error-type="not-found">
{{t "error.poll.notFound.title"}}
</h2>
<p>
{{t "error.poll.notFound.description"}}
</p>
<ul>
<li>
{{t "error.poll.notFound.reasons.expired"}}
</li>
<li>
{{t "error.poll.notFound.reasons.typo"}}
</li>
</ul>
{{else}}
<h2 data-test-error-type="unexpected">
{{t "error.poll.unexpected.title"}}
</h2>
<p>
{{t "error.poll.unexpected.description"}}
</p>
{{/if}}
</div>