Development #10508
Add valid_email and confirm_data to RegistrationCompletionView to allow prefilling and modifications on registration
100%
Description
valid_email parameter is used to tell if an email is already valid has been provided. By default, it is True like the previsous behaviour. If it is False, an email field is added to the form, prefilled if there's a value in the token. If an value value is submitted : * Either the email value is the same as in the token (the user confims it), then the validation email sending is skipped. * Or it is different and a validation email is sent. confirm_data parameter is used to tell that even if all the data in the token match the form fields, a user confirmation is necessary. That result in displaying the prefilled form. By default, confirm_data is False like the previous behaviour.
Fichiers
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
It makes no sense to me that it should be an option, I think that the backend should just state to the registration page that the email is already validated.
Mis à jour par Mikaël Ates il y a environ 8 ans
Use a single setting A2_AUTH_FC_AUTO_REGISTER (One setting per module)
No need for registration_form_prefill().
It needs a view /accounts/fc/register/ redirecting to
build_activation_url(next_url=requests.GET.get('next_url'), email=fc_user_info['email'], valid_email=True, other fields,
confirm_data=not app_settings.A2_AUTH_FC_AUTO_REGISTER)
In RegistrationCompletionView() it needs to modify get_form_class() to add a field email if self.token.get('confirm_data') is True, and, if the email submitted is different from self.token['email'] to send a registration email (without confirm_data=True).
It lets feasible to go back a single page with profil field and email with A2_REGISTER_EMAIL_FIRST=False. It brings to a prefill registration form.
It needs also to modify send_registration_mail() to send valid_email=True.
Mis à jour par Mikaël Ates il y a environ 8 ans
- Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch ajouté
Mis à jour par Mikaël Ates il y a environ 8 ans
- Fichier
0001-Use-prefilling-data-to-skip-resgitration-forms.patchsupprimé
Mis à jour par Mikaël Ates il y a environ 8 ans
- Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch ajouté
Mis à jour par Mikaël Ates il y a environ 8 ans
- Fichier
0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patchsupprimé
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Sujet changé de Use prefilling data to skip resgitration forms. à Add valid_email and confirm_data to RegistrationCompletionView to allow prefilling and modifications on registration
- Description mis à jour (diff)
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
Ack, but I would like test like with other's.
Mis à jour par Mikaël Ates il y a environ 8 ans
- Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch ajouté
I modified the patch concerning the registration template names.
This patch used the patch of 10600 that was a bad idea.
Instead I use 10635 that should be a better way.
I put legacy_template_names in the module to reuse it 10601.
Mis à jour par Mikaël Ates il y a environ 8 ans
- Fichier
0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patchsupprimé
Mis à jour par Mikaël Ates il y a environ 8 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit authentic2|60188515d2757df5e9f4723617ebfc2e63a9c3c5.
Add valid_email and confirm_data to RegistrationCompletionView (fixes #10508).