Development #6950
Refactoring of all user editing views
Start date:
15 Apr 2015
Due date:
% Done:
100%
Estimated time:
Patch proposed:
No
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.
Associated revisions
History
Updated by Benjamin Dauvergne almost 6 years ago
- Description updated (diff)
- Assignee set to Benjamin Dauvergne
- Target version set to 2.2.0
Updated by Benjamin Dauvergne almost 6 years ago
- Status changed from Nouveau to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit 700fc9b280b2a608d7cc0ca1ceb7d67bd48ef951.
Updated by Benjamin Dauvergne about 5 years ago
- Status changed from Résolu (à déployer) to Solution déployée
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.