summaryrefslogtreecommitdiff
path: root/templates/account.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-30 10:46:46 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-30 10:46:46 +0200
commit4ad1a1d20e52f7aa4b1ae2b7cc84c83c584d6725 (patch)
tree6789585c98a334938219d0c9aae0c7f947393e65 /templates/account.html.ep
parent0226eba60ac14809f357240636a6a7151ef1ab1d (diff)
Move invalid input errors into common sub-template
Diffstat (limited to 'templates/account.html.ep')
-rw-r--r--templates/account.html.ep25
1 files changed, 1 insertions, 24 deletions
diff --git a/templates/account.html.ep b/templates/account.html.ep
index 90c64fc..ca43340 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -1,28 +1,5 @@
% if (my $invalid = stash('invalid')) {
- <div class="row">
- <div class="col s12">
- <div class="card red darken-4">
- <div class="card-content white-text">
- % if ($invalid eq 'csrf') {
- <span class="card-title">Ungültiger CSRF-Token</span>
- <p>Sind Cookies aktiviert? Ansonsten könnte es sich um einen
- Fall von <a
- href="https://de.wikipedia.org/wiki/Cross-Site-Request-Forgery">CSRF</a>
- handeln.</p>
- % }
- % elsif ($invalid eq 'password') {
- <span class="card-title">Ungültiges Passwort</span>
- <p>Aus Sicherheitsgründen kann der Account nur nach Passworteingabe
- gelöscht werden.</p>
- % }
- % else {
- <span class="card-title">Unbekannter Fehler</span>
- <p>„<%= $invalid %>“</p>
- % }
- </div>
- </div>
- </div>
- </div>
+ %= include '_invalid_input', invalid => $invalid
% }
<h1>Account</h1>