diff --git a/lemarche/templates/auth/signup.html b/lemarche/templates/auth/signup.html index 2ff82f2b9..375366b60 100644 --- a/lemarche/templates/auth/signup.html +++ b/lemarche/templates/auth/signup.html @@ -91,7 +91,14 @@

Inscription

- {% bootstrap_field form.accept_rgpd %} +
+
+ {{ form.accept_rgpd }} + +
+
{% bootstrap_field form.accept_survey form_group_class="form-group accept-survey-form-group d-none" %} {% bootstrap_field form.accept_share_contact_to_external_partners form_group_class="form-group accept-survey-form-group d-none" %}
diff --git a/lemarche/users/migrations/0035_alter_user_accept_rgpd.py b/lemarche/users/migrations/0035_alter_user_accept_rgpd.py new file mode 100644 index 000000000..cd1087222 --- /dev/null +++ b/lemarche/users/migrations/0035_alter_user_accept_rgpd.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.13 on 2024-06-10 15:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("users", "0034_alter_user_phone"), + ] + + operations = [ + migrations.AlterField( + model_name="user", + name="accept_rgpd", + field=models.BooleanField(default=False), + ), + ] diff --git a/lemarche/users/models.py b/lemarche/users/models.py index 8571f9433..b1b0e197a 100644 --- a/lemarche/users/models.py +++ b/lemarche/users/models.py @@ -223,7 +223,7 @@ class User(AbstractUser): verbose_name="Date de dernière mise à jour de la clé API", blank=True, null=True ) - accept_rgpd = models.BooleanField(help_text="J'accepte les conditions d'utilisation du service", default=False) + accept_rgpd = models.BooleanField(default=False) accept_survey = models.BooleanField( help_text="J'accepte de répondre à une enquête deux fois par an afin de permettre de mesurer la progression des achats inclusifs en France", # noqa default=False, diff --git a/lemarche/www/auth/forms.py b/lemarche/www/auth/forms.py index 30a73dbb1..dfa78c323 100644 --- a/lemarche/www/auth/forms.py +++ b/lemarche/www/auth/forms.py @@ -77,7 +77,10 @@ class SignupForm(UserCreationForm): widget=forms.RadioSelect(), required=False, ) - accept_rgpd = forms.BooleanField(label=User._meta.get_field("accept_rgpd").help_text, help_text="", required=True) + + accept_rgpd = forms.BooleanField( + widget=forms.widgets.CheckboxInput(attrs={"class": "form-check-input"}), required=True + ) # accept_survey is hidden by default in the frontend. Shown if the user choses kind BUYER or PARTNER accept_survey = forms.BooleanField( label=User._meta.get_field("accept_survey").help_text, help_text="", required=False