From 9f3b80a859a8e54856dd283b635a4abfe377feb9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 3 May 2019 18:57:24 +0200 Subject: [PATCH] use /account/... links for mail/password change --- lib/Travelynx.pm | 8 ++++---- templates/account.html.ep | 4 ++-- templates/change_mail.html.ep | 2 +- templates/change_password.html.ep | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index a9e39bd..7829d2a 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1754,8 +1754,8 @@ sub startup { $authed_r->get('/account/privacy')->to('account#privacy'); $authed_r->get('/ajax/status_card.html')->to('traveling#status_card'); $authed_r->get('/cancelled')->to('traveling#cancelled'); - $authed_r->get('/change_password')->to('account#password_form'); - $authed_r->get('/change_mail')->to('account#change_mail'); + $authed_r->get('/account/password')->to('account#password_form'); + $authed_r->get('/account/mail')->to('account#change_mail'); $authed_r->get('/export.json')->to('account#json_export'); $authed_r->get('/history.json')->to('traveling#json_history'); $authed_r->get('/history')->to('traveling#history'); @@ -1768,8 +1768,8 @@ sub startup { $authed_r->post('/account/privacy')->to('account#privacy'); $authed_r->post('/journey/add')->to('traveling#add_journey_form'); $authed_r->post('/journey/edit')->to('traveling#edit_journey'); - $authed_r->post('/change_password')->to('account#change_password'); - $authed_r->post('/change_mail')->to('account#change_mail'); + $authed_r->post('/account/password')->to('account#change_password'); + $authed_r->post('/account/mail')->to('account#change_mail'); $authed_r->post('/delete')->to('account#delete'); $authed_r->post('/logout')->to('account#do_logout'); $authed_r->post('/set_token')->to('api#set_token'); diff --git a/templates/account.html.ep b/templates/account.html.ep index 38ffecb..7baacbe 100644 --- a/templates/account.html.ep +++ b/templates/account.html.ep @@ -30,11 +30,11 @@ Mail - edit<%= $acc->{email} %> + edit<%= $acc->{email} %> Passwort - edit + edit Öffentliche Daten diff --git a/templates/change_mail.html.ep b/templates/change_mail.html.ep index 6fde245..65d3d8d 100644 --- a/templates/change_mail.html.ep +++ b/templates/change_mail.html.ep @@ -20,7 +20,7 @@ % }

Mail ändern

-%= form_for '/change_mail' => (method => 'POST') => begin +%= form_for '/account/mail' => (method => 'POST') => begin %= csrf_field
diff --git a/templates/change_password.html.ep b/templates/change_password.html.ep index fa03e28..29aa621 100644 --- a/templates/change_password.html.ep +++ b/templates/change_password.html.ep @@ -3,7 +3,7 @@ % }

Passwort ändern

-%= form_for '/change_password' => (method => 'POST') => begin +%= form_for '/account/password' => (method => 'POST') => begin %= csrf_field