From 1405eb6ea3fe95fcb9c205c6c4c250433d48819c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 6 Apr 2019 11:20:10 +0200 Subject: Add password change form --- templates/change_password.html.ep | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 templates/change_password.html.ep (limited to 'templates/change_password.html.ep') diff --git a/templates/change_password.html.ep b/templates/change_password.html.ep new file mode 100644 index 0000000..bae28d9 --- /dev/null +++ b/templates/change_password.html.ep @@ -0,0 +1,69 @@ +% if (my $invalid = stash('invalid')) { +
+
+
+
+ % if ($invalid eq 'csrf') { + Ungültiger CSRF-Token +

Sind Cookies aktiviert? Ansonsten könnte es sich um einen + Fall von CSRF + handeln.

+ % } + % elsif ($invalid eq 'password_notequal') { + Passwort ungültig +

Die angegebenen neuen Passwörter sind nicht identisch.

+ % } + % elsif ($invalid eq 'password_short') { + Passwort zu kurz +

Das neue Passwort muss mindestens acht Zeichen lang sein.

+ % } + % elsif ($invalid eq 'password') { + Ungültiges Passwort +

Das aktuelle Passwort wurde nicht korrekt eingegeben.

+ % } + % else { + Unbekannter Fehler +

„<%= $invalid %>“

+ % } +
+
+
+
+% } + +

Passwort ändern

+%= form_for '/change_password' => (method => 'POST') => begin + %= csrf_field +
+
+ lock + %= password_field 'oldpw', id => 'oldpassword', class => 'validate', required => undef, autocomplete => 'current-password' + +
+
+
+
+ lock + %= password_field 'newpw', id => 'password', class => 'validate', required => undef, minlength => 8, autocomplete => 'new-password' + +
+
+ lock + %= password_field 'newpw2', id => 'password2', class => 'validate', required => undef, minlength => 8, autocomplete => 'new-password' + +
+
+
+
+
+
+ +
+
+
+
+%= end -- cgit v1.2.3