templates/user/register.html.twig line 14

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3.     {% if not app.user %}
  4.         <section class="container mt-5">
  5.             <div class="row justify-content-center">
  6.                 <div class="col-md-6">
  7.                     <h1 class="text-center mb-4">Registrieren</h1>
  8.                     
  9.                     <p class="text-center">Erstelle noch heute ein Konto. Fülle dazu einfach das folgende Formular aus oder melde dich mit einem deiner sozialen Netzwerke an.</p>
  10.                     <section class="registration-form card p-4 shadow">
  11.                         <!-- Registration Form -->
  12.                         {{ form_start(registrationForm) }}
  13.                             <div class="mb-3">
  14.                                 {{ form_label(registrationForm.email, 'E-Mail-Adresse') }}
  15.                                 {{ form_widget(registrationForm.email, { 'attr': {'class': 'form-control'} }) }}
  16.                                 {{ form_errors(registrationForm.email) }}
  17.                             </div>
  18.                             <div class="mb-3">
  19.                                 {{ form_label(registrationForm.plainPassword.first, 'Passwort') }}
  20.                                 {{ form_widget(registrationForm.plainPassword.first, { 'attr': {'class': 'form-control'} }) }}
  21.                                 {{ form_errors(registrationForm.plainPassword.first) }}
  22.                             </div>
  23.                             <div class="mb-3">
  24.                                 {{ form_label(registrationForm.plainPassword.second, 'Passwort wiederholen') }}
  25.                                 {{ form_widget(registrationForm.plainPassword.second, { 'attr': {'class': 'form-control'} }) }}
  26.                                 {{ form_errors(registrationForm.plainPassword.second) }}
  27.                             </div>
  28.                             <div class="mb-3 form-check">
  29.                                 {{ form_widget(registrationForm.agreeTerms, { 'attr': {'class': 'form-check-input'} }) }}
  30.                                 {{ form_label(registrationForm.agreeTerms, 'Ich stimme den Nutzungsbedingungen zu', { 'attr': {'class': 'form-check-label'} }) }}
  31.                                 {{ form_errors(registrationForm.agreeTerms) }}
  32.                             </div>
  33.                             
  34.                             <!-- Social Login Buttons -->
  35.                             <div class="d-flex justify-content-center mb-3">
  36.                                 <a href="{{ path('connect_google_start') }}" class="btn btn-danger mx-2"><i class="fab fa-google"></i> Mit Google registrieren</a>
  37.                                 <a href="#" class="btn btn-info mx-2"><i class="fab fa-twitter"></i> Mit Twitter registrieren</a>
  38.                             </div>
  39.                             <p class="text-center">Hast du bereits ein Konto? <a href="{{ path('app_login') }}">Hier anmelden</a>.</p>
  40.                             <div class="d-grid">
  41.                                 <button type="submit" class="btn btn-primary btn-block">Registrieren</button>
  42.                             </div>
  43.                         {{ form_end(registrationForm) }}
  44.                     </section>
  45.                 </div>
  46.             </div>
  47.         </section>
  48.     {% else %}
  49.         {# Optional: Benutzer umleiten oder eine Nachricht anzeigen #}
  50.         <div class="container mt-5">
  51.             <div class="alert alert-warning text-center">
  52.                 Du bist bereits eingeloggt und kannst dich nicht erneut registrieren.
  53.             </div>
  54.         </div>
  55.     {% endif %}
  56. {% endblock %}