Development #6950
Refactoring of all user editing views
Début:
15 avril 2015
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Non
Planning:
Description
There is too much ad-hoc code in profile edition form, admin user change form, manager user edit form and registration form.
They should all use a same base user form, with adaptations done using a variation on the modelform_factory() function. It should be possible to set the list of fields to show, their labels and which one are required.
Username and email can be set to be globally unique or only for users registered online.
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Description mis à jour (diff)
- Assigné à mis à Benjamin Dauvergne
- Version cible mis à 2.2.0
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit 700fc9b280b2a608d7cc0ca1ceb7d67bd48ef951.
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Solution déployée à Fermé
Refactor all model forms on the User model (fixes #6950)
All forms have been rebased on a BaseUserForm using modelform_factory.
New settings are introduces:
- A2_USERNAME_IS_UNIQUE
- A2_EMAIL_IS_UNIQUE
- A2_REGISTRATION_USERNAME_IS_UNIQUE
- A2_REQUIRED_FIELDS
Beware that attributes settings using the Attribute model supersede the
settings; i.e. if an attribute has the ask_on_registration flag, it will always
be shown, A2_REGISTRATION_FIELDS will just change its order; required field are
also always shown.