-
-
+ {% if app.user %}
+
+ You are logged in as {{ app.user.userIdentifier }},
Logout
- #}
+ {% else %}
+
+
+
{{ 'Create an account'|trans }}
+
+ {% endif %}
{% endblock %}
diff --git a/templates/registration/confirmation_email.html.twig b/templates/registration/confirmation_email.html.twig
new file mode 100644
index 0000000..7c79d8a
--- /dev/null
+++ b/templates/registration/confirmation_email.html.twig
@@ -0,0 +1,11 @@
+
Hi! Please confirm your email!
+
+
+ Please confirm your email address by clicking the following link:
+ Confirm my Email.
+ This link will expire in {{ expiresAtMessageKey|trans(expiresAtMessageData, 'VerifyEmailBundle') }}.
+
+
+
+ Cheers!
+
diff --git a/templates/registration/register.html.twig b/templates/registration/register.html.twig
new file mode 100644
index 0000000..dd88bb6
--- /dev/null
+++ b/templates/registration/register.html.twig
@@ -0,0 +1,17 @@
+{% extends 'backoffice/base.html.twig' %}
+{% block title %}{{ 'Register'|trans }}{% endblock %}
+
+{% block body %}
+
{{ 'Register'|trans }}
+
+ {{ form_errors(registrationForm) }}
+
+ {{ form_start(registrationForm) }}
+ {{ form_row(registrationForm.email) }}
+ {{ form_row(registrationForm.plainPassword) }}
+
+
+
{{ 'Already have an account? Log in'|trans }}
+
+ {{ form_end(registrationForm) }}
+{% endblock %}
diff --git a/tests/LoginControllerTest.php b/tests/LoginControllerTest.php
deleted file mode 100644
index ff6134a..0000000
--- a/tests/LoginControllerTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-client = static::createClient();
- $container = static::getContainer();
- $em = $container->get('doctrine.orm.entity_manager');
- $userRepository = $em->getRepository(User::class);
-
- // Remove any existing users from the test database
- foreach ($userRepository->findAll() as $user) {
- $em->remove($user);
- }
-
- $em->flush();
-
- // Create a User fixture
- /** @var UserPasswordHasherInterface $passwordHasher */
- $passwordHasher = $container->get('security.user_password_hasher');
-
- $user = (new User())->setEmail('email@example.com');
- $user->setPassword($passwordHasher->hashPassword($user, 'password'));
-
- $em->persist($user);
- $em->flush();
- }
-
- public function testLogin(): void
- {
- // Denied - Can't login with invalid email address.
- $this->client->request('GET', '/login');
- $this->assertResponseIsSuccessful();
-
- $this->client->submitForm('Sign in', [
- '_username' => 'doesNotExist@example.com',
- '_password' => 'password',
- ]);
-
- $this->assertResponseRedirects('/login');
- $this->client->followRedirect();
-
- // Ensure we do not reveal if the user exists or not.
- $this->assertSelectorTextContains('.alert-danger', 'Invalid credentials.');
-
- // Denied - Can't login with invalid password.
- $this->client->request('GET', '/login');
- $this->assertResponseIsSuccessful();
-
- $this->client->submitForm('Sign in', [
- '_username' => 'email@example.com',
- '_password' => 'bad-password',
- ]);
-
- $this->assertResponseRedirects('/login');
- $this->client->followRedirect();
-
- // Ensure we do not reveal the user exists but the password is wrong.
- $this->assertSelectorTextContains('.alert-danger', 'Invalid credentials.');
-
- // Success - Login with valid credentials is allowed.
- $this->client->submitForm('Sign in', [
- '_username' => 'email@example.com',
- '_password' => 'password',
- ]);
-
- $this->assertResponseRedirects('/');
- $this->client->followRedirect();
-
- $this->assertSelectorNotExists('.alert-danger');
- $this->assertResponseIsSuccessful();
- }
-}
diff --git a/translations/messages+intl-icu.nl.yaml b/translations/messages+intl-icu.nl.yaml
index 792cb4b..5379739 100644
--- a/translations/messages+intl-icu.nl.yaml
+++ b/translations/messages+intl-icu.nl.yaml
@@ -1,8 +1,12 @@
'Active Quiz': 'Actieve test'
+'All Seasons': 'Alle seizoenen'
+'Already have an account? Log in': 'Heb je al een account? Log in'
Candidate: Kandidaat
Candidates: Kandidaten
'Correct Answers': 'Goede antwoorden'
Corrections: Jokers
+'Create an account': 'Maak een account aan'
+Email: E-mail
'Enter your name': 'Voor je naam in'
'Load Prepared Elimination': 'Laad voorbereide eliminatie'
Manage: Beheren
@@ -10,15 +14,21 @@ Name: Naam
'No active quiz': 'Geen actieve test'
'No results': 'Geen resultaten'
'Number of dropouts:': 'Aantal afvallers:'
+Owner(s): Eigenar(en)
+Password: Wachtwoord
+'Please Confirm your Email': messages
+'Please sign in': 'Log in aub'
'Prepare Custom Elimination': 'Bereid aangepaste eliminatie voor'
-'Preregister?': 'Voorregistreren?'
Questions: Vragen
Quiz: Test
Quizzes: Tests
+Register: Registreren
+'Remember me': 'Onthoud mij'
Score: Score
Season: Seizoen
'Season Code': Seizoenscode
Seasons: Seizoenen
+'Sign in': 'Log in'
'Start Elimination': 'Start eliminatie'
'There are no answers for this question': 'Er zijn geen antwoorden voor deze vraag'
Time: Tijd