templates/security/registration/index.html.twig line 1

  1. {% extends "master.html.twig" %}
  2. {% block title %}Inscription{% endblock %}
  3. {% block body %}
  4.     <style>
  5.         .check label {
  6.             margin-right: 1rem !important;
  7.         }
  8.     </style>
  9.     <img class="bg-arriere" src="{{ asset('assets/img/background1.png') }}" alt="">
  10.     <div class="auth-page-wrapper pt-5">
  11.         <!-- auth page content -->
  12.         <div class="auth-page-content">
  13.             <div class="container">
  14.                 <div class="row justify-content-center mt-5">
  15.                     <div class="col-md-12 col-lg-10 col-xl-10">
  16.                         <div class="card mt-4">
  17.                             <div class="card-body p-4">
  18.                                 <div {{ react_component('Registration/CreateAccount', {
  19.                                     'routes': {
  20.                                         'registration': path('app_registration_save'),
  21.                                         'proofs': path('app_registration_save_proofs'),
  22.                                         'generate_subscription': path('app_registration_generate_subscription'),
  23.                                         'signature': path('app_registration_subscription_signature'),
  24.                                         'success': path('app_registration_success'),
  25.                                         'conditions': path('app_legal_terms'),
  26.                                     },
  27.                                     'inputCurrencies': get_currencies(),
  28.                                     'locale': app.request.getLocale(),
  29.                                     'deeplApiKey': deepl_apikey,
  30.                                     'recaptchaSiteKey': recaptcha_sitekey,
  31.                                     'beneficiary': beneficiary
  32.                                 }) }}></div>
  33.                             </div>
  34.                         </div>
  35.                         <div class="mt-4 text-center">
  36.                             <p class="mb-0">{% trans %}Vous avez déjà un compte ?{% endtrans %}
  37.                                 <a href="{{ path('app_login') }}"
  38.                                    class="fw-semibold text-primary text-decoration-underline">
  39.                                     {% trans %}Se connecter{% endtrans %}
  40.                                 </a>
  41.                             </p>
  42.                         </div>
  43.                     </div>
  44.                 </div>
  45.             </div>
  46.         </div>
  47.     </div>
  48. {#    <script>#}
  49. {#        const checkboxes = document.querySelectorAll('input[name="form[types][]"]');#}
  50. {#        const selectedTypesList = document.querySelector('#selected_types_list');#}
  51. {#        const selectedTypesInput = document.querySelector('#selected_types');#}
  52. {#        checkboxes.forEach(checkbox => {#}
  53. {#            checkbox.addEventListener('change', () => {#}
  54. {#                const selectedText = checkbox.nextElementSibling.textContent;#}
  55. {#                const listItem = document.createElement('span');#}
  56. {#                listItem.classList.add('selected-type');#}
  57. {#                listItem.textContent = selectedText;#}
  58. {#                selectedTypesList.appendChild(listItem);#}
  59. {#                updateSelectedTypesInput();#}
  60. {#            });#}
  61. {#        });#}
  62. {#        function updateSelectedTypesInput() {#}
  63. {#            const selectedValues = [];#}
  64. {#            checkboxes.forEach(checkbox => {#}
  65. {#                if (checkbox.checked) {#}
  66. {#                    selectedValues.push(checkbox.value);#}
  67. {#                }#}
  68. {#            });#}
  69. {#            selectedTypesInput.value = selectedValues.join(',');#}
  70. {#        }#}
  71. {#    </script>#}
  72. {#    <script>#}
  73. {#        // Récupérez l'élément input par son ID#}
  74. {#        var dateInput = document.getElementById('dateInput');#}
  75. {#        // Obtenez la date du jour au format ISO (AAAA-MM-JJTHH:mm)#}
  76. {#        var today = new Date().toISOString().slice(0, 16);#}
  77. {#        // Définissez la date minimale (aujourd'hui) pour l'élément input#}
  78. {#        dateInput.min = today;#}
  79. {#    </script>#}
  80. {% endblock %}