]> git.parisson.com Git - teleforma.git/commitdiff
https://trackers.pilotsystems.net/prebarreau/0372 : changes on registration form
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 21 Mar 2022 16:00:24 +0000 (17:00 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 21 Mar 2022 16:00:24 +0000 (17:00 +0100)
teleforma/forms.py
teleforma/templates/registration/registration_form.html

index 01674afd0a2d5ee00ca6a41bf44121fca7bf217e..519b5d99d7a6f19fda30683d1d8c3c7839a143cb 100644 (file)
@@ -34,6 +34,11 @@ TRUE_FALSE_CHOICES = (
     (False, 'Non')
 )
 
+TRAINING_TYPE = (
+    ('', '---------'),
+    (False, 'Formation sur place'),
+    (True, 'Formation e-learning')
+)
 
 def get_unique_username(first_name, last_name):
     username = slugify(first_name)[0] + '.' + slugify(last_name)
@@ -86,13 +91,14 @@ class UserForm(ModelForm):
     level = ChoiceField(label=_('Studying level'), choices=LEVEL_CHOICES)
     iej = ModelChoiceField(label='IEJ',
                            queryset=IEJ.objects.all())
-    platform_only = forms.ChoiceField(choices=TRUE_FALSE_CHOICES,
-                                      label='E-learning uniquement',
-                                      widget=forms.Select())
     period = ModelChoiceField(label='Période',
                               queryset=Period.objects.filter(is_open=True,
                                                              date_inscription_start__lte=datetime.datetime.now(),
                                                              date_inscription_end__gte=datetime.datetime.now()))
+    platform_only = forms.ChoiceField(choices=TRAINING_TYPE,
+                                      label='Type de formation',
+                                      widget=forms.Select())
+
     training = ModelChoiceField(label='Formation',
                                 queryset=Training.objects.filter(available=True))
     procedure = ModelChoiceField(label=_('Procedure'),
@@ -132,8 +138,8 @@ class UserForm(ModelForm):
         self.fields['email'].required = True
         self.user_fields = ['first_name', 'last_name', 'email', 'address', 'address_detail',
                             'postal_code', 'city', 'country', 'telephone', 'birthday', 'portrait']
-        self.training_fields = ['level', 'iej', 'platform_only', 'fascicule',
-                                'period', 'training', 'procedure', 'written_speciality', 'oral_1']
+        self.training_fields = ['level', 'iej', 'period', 'platform_only', 'fascicule',
+                                'training', 'procedure', 'written_speciality', 'oral_1']
 
     def clean_portrait(self):
         image = self.cleaned_data['portrait']
index affee5a166a6213e6e329964f23a8d35368fab2b..15d644dffd017756cbb06bbc0e80ae433a9bc929 100644 (file)
 <form class="register" id="_registerForm" method="post" action="" enctype="multipart/form-data" data-ajax="false">
     {% csrf_token %}
 
-    <p>Pour ceux qui <strong>souhaitent s’inscrire en présentiel</strong>, nous vous informons que vous êtes
-        susceptibles
-        - dans la mesure ou les conditions sanitaires ne s’amélioreraient pas d’ici fin juin et que les mesures
-        gouvernementales nous imposeraient des effectifs réduits – <strong>d’être basculé en e-learning</strong>.</p>
-
-    <p>Bien évidemment, dans ce cas de figure, vous seriez remboursé à due concurrence.</p>
-    <br />
-
     <h1>{% if mode_corrector %}Pré-inscription des correcteurs - PRÉ-BARREAU -
         CRFPA{% else %}{% trans "Pre-registration" %} -
-        {% description %}{% endif %}</h1>
+        Formation CRFPA - Le pré-barreau{% endif %}</h1>
 
     {{ introduction|safe }}