diff --git a/config/routes.php b/config/routes.php index 6c44bb1a..72f52099 100644 --- a/config/routes.php +++ b/config/routes.php @@ -8,8 +8,8 @@ use FastRoute\RouteCollector; // Pages $route->get('/', 'HomeController@index'); -$route->get('/sign-up', 'SignUpController@view'); -$route->post('/sign-up', 'SignUpController@save'); +$route->get('/register', 'SignUpController@view'); +$route->post('/register', 'SignUpController@save'); $route->get('/credits', 'CreditsController@index'); $route->get('/health', 'HealthController@index'); diff --git a/includes/view/User_view.php b/includes/view/User_view.php index b01a922a..30eb0924 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -174,7 +174,7 @@ function Users_view( unset($user_table_headers[$key]); } - $link = button(page_link_to('sign-up'), icon('plus-lg'), 'add'); + $link = button(url('register'), icon('plus-lg'), 'add'); return page_with_title(__('All users') . ' ' . $link, [ msg(), table($user_table_headers, $usersList), diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index a5a04149..cbeb37f7 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -1710,7 +1710,7 @@ msgid "settings.profile.email_messages" msgstr "Benachrichtige mich bei neuen privaten Nachrichten." msgid "settings.profile.email_by_human_allowed" -msgstr "Erlaube Himmel-Engeln dich per Mail zu kontaktieren." +msgstr "Erlaube Himmel-Engeln mich per Mail zu kontaktieren." msgid "settings.profile.email_goody" msgstr "Um gegebenenfalls Voucher für das nächste gleichartige Event zu erhalten stimme ich zu, " diff --git a/resources/lang/en_US/default.po b/resources/lang/en_US/default.po index 41bb98ad..76c08a04 100644 --- a/resources/lang/en_US/default.po +++ b/resources/lang/en_US/default.po @@ -281,7 +281,7 @@ msgid "settings.profile.email_messages" msgstr "Notify me on new private messages." msgid "settings.profile.email_by_human_allowed" -msgstr "Allow heaven angels to contact you by e-mail." +msgstr "Allow heaven angels to contact me by e-mail." msgid "settings.profile.email_goody" msgstr "To possibly receive vouchers for the next similar event, I consent " @@ -577,7 +577,7 @@ msgid "dashboard.day" msgstr "Day" msgid "page.sign-up.title" -msgstr "Angel sign-up" +msgstr "Angel registration" msgid "page.sign-up.login-data" msgstr "Login data" @@ -589,10 +589,10 @@ msgid "page.sign-up.what-do-you-want-to-do" msgstr "What do you want to do?" msgid "page.sign-up.sign-up" -msgstr "Sign up" +msgstr "Register" msgid "pages.sign-up.disabled" msgstr "The angel registration is disabled" msgid "pages.sign-up.successful" -msgstr "Angel sign-up success. You can now log in." +msgstr "Angel registration success. You can now log in." diff --git a/resources/views/layouts/parts/navbar.twig b/resources/views/layouts/parts/navbar.twig index 8b48c057..7e3a9957 100644 --- a/resources/views/layouts/parts/navbar.twig +++ b/resources/views/layouts/parts/navbar.twig @@ -59,7 +59,7 @@ {% include "layouts/parts/language_dropdown.twig" %} {% if has_permission_to('register') and config('registration_enabled') %} - {{ _self.toolbar_item(__('Register'), url('/sign-up'), 'register', 'plus') }} + {{ _self.toolbar_item(__('Register'), url('/register'), 'register', 'plus') }} {% endif %} {% if has_permission_to('login') %} diff --git a/resources/views/pages/angeltypes/about.twig b/resources/views/pages/angeltypes/about.twig index 076f411f..46af30a1 100644 --- a/resources/views/pages/angeltypes/about.twig +++ b/resources/views/pages/angeltypes/about.twig @@ -15,7 +15,7 @@ {% else %} {% if has_permission_to('register') and config('registration_enabled') %} - + {{ __('registration.register') }} {% endif %} diff --git a/resources/views/pages/login.twig b/resources/views/pages/login.twig index 097c5fa1..563eab5d 100644 --- a/resources/views/pages/login.twig +++ b/resources/views/pages/login.twig @@ -106,7 +106,7 @@ {% if has_permission_to('register') and config('registration_enabled') %} {% if config('enable_password') %}

{{ __('Please sign up, if you want to help us!') }}

- {{ __('Register') }} » + {{ __('Register') }} » {% else %}

{{ __('Registration is only available via external login.') }}

{% endif %} diff --git a/resources/views/pages/sign-up.twig b/resources/views/pages/sign-up.twig index c9e177f6..1d9b1b8f 100644 --- a/resources/views/pages/sign-up.twig +++ b/resources/views/pages/sign-up.twig @@ -18,7 +18,7 @@ {% include 'layouts/parts/messages.twig' %} -
+ {{ csrf() }}
diff --git a/src/Controllers/OAuthController.php b/src/Controllers/OAuthController.php index 0fb1bbe4..d606e4b7 100644 --- a/src/Controllers/OAuthController.php +++ b/src/Controllers/OAuthController.php @@ -324,6 +324,6 @@ class OAuthController extends BaseController $this->session->set('oauth2_enable_password', $config['enable_password']); $this->session->set('oauth2_allow_registration', $config['allow_registration']); - return $this->redirect->to('/sign-up'); + return $this->redirect->to('/register'); } } diff --git a/src/Controllers/SignUpController.php b/src/Controllers/SignUpController.php index ed634fc7..85c62d0d 100644 --- a/src/Controllers/SignUpController.php +++ b/src/Controllers/SignUpController.php @@ -63,7 +63,7 @@ class SignUpController extends BaseController if ($this->auth->user()) { // User is already logged in - that means a supporter has registered an angel. Return to register page. - return $this->redirect->to('/sign-up'); + return $this->redirect->to('/register'); } return $this->redirect->to('/'); diff --git a/tests/Unit/Controllers/OAuthControllerTest.php b/tests/Unit/Controllers/OAuthControllerTest.php index 01166113..fb0e5d2f 100644 --- a/tests/Unit/Controllers/OAuthControllerTest.php +++ b/tests/Unit/Controllers/OAuthControllerTest.php @@ -440,7 +440,7 @@ class OAuthControllerTest extends TestCase $this->setExpects($this->auth, 'user', null, null, $this->atLeastOnce()); - $this->setExpects($this->redirect, 'to', ['/sign-up']); + $this->setExpects($this->redirect, 'to', ['/register']); $request = new Request(); $request = $request @@ -528,7 +528,7 @@ class OAuthControllerTest extends TestCase $this->setExpects($this->auth, 'user', null, null, $this->atLeastOnce()); - $this->setExpects($this->redirect, 'to', ['/sign-up']); + $this->setExpects($this->redirect, 'to', ['/register']); $request = new Request(); $request = $request diff --git a/tests/Unit/Controllers/SignUpControllerTest.php b/tests/Unit/Controllers/SignUpControllerTest.php index 4b020e64..bf3ffafd 100644 --- a/tests/Unit/Controllers/SignUpControllerTest.php +++ b/tests/Unit/Controllers/SignUpControllerTest.php @@ -100,7 +100,7 @@ final class SignUpControllerTest extends ControllerTest $this->response ->expects(self::once()) ->method('redirectTo') - ->with('http://localhost/sign-up', 302); + ->with('http://localhost/register', 302); $this->subject->save($request); }