Projet

Général

Profil

Development #10508

Add valid_email and confirm_data to RegistrationCompletionView to allow prefilling and modifications on registration

Ajouté par Mikaël Ates il y a environ 8 ans. Mis à jour il y a presque 8 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
31 mars 2016
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Oui
Planning:

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

Révision 60188515 (diff)
Ajouté par Mikaël Ates il y a environ 8 ans

Add valid_email and confirm_data to RegistrationCompletionView (fixes #10508).

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.

Historique

#1

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Description mis à jour (diff)
#2

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.

#3

Mis à jour par Mikaël Ates il y a environ 8 ans

I think the 'ou' is not well handled also.

#4

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.

#5

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Assigné à mis à Mikaël Ates
#6

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch ajouté
#7

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Fichier 0001-Use-prefilling-data-to-skip-resgitration-forms.patch supprimé
#8

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch ajouté
#9

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch supprimé
#10

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)
#11

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

Ack, but I would like test like with other's.

#12

Mis à jour par Mikaël Ates il y a environ 8 ans

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.

#13

Mis à jour par Mikaël Ates il y a environ 8 ans

  • Fichier 0001-Add-valid_email-and-confirm_data-to-RegistrationComp.patch supprimé
#14

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
#15

Mis à jour par Mikaël Ates il y a presque 8 ans

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF