Back in December, I asked Kees to think about what would be involved in
modifying the two user preferences forms (prefs_user_details and
personalize_form) to function in a way similar to the new registration forms.
It seemed silly that we had this nice new, extensible way to add and remove
fields on the registration forms, but those changes weren't reflected in the
forms the user/admins would use to modify that data once the registration
process was complete.
With apologies to Kees, I'm just going to paste his response to me here...
> Hi Eric,
> Some time ago you asked me to look into modifying prefs_user_details and
> personalize_form, so they take extra fields defined in plone.app.users' forms
> into account. I have finally thought about this, and gotten some of the work
> the way. I'll sketch my proposed approach here.
> It seems to me the best way to go is to modify the prefs_user_details and
> personalize_form in such a way that work as @@register and @@new-user, that is
> with a Zope form class. That seems more than a simple change, and i'm
> if this is what you had in mind. On the other hand, it does give us a chance
> clean up the code, and fix plip 9311 (https://dev.plone.org/plone/ticket/9311)
> along the way. Please let me know if this approach is feasible.
> What i've done is create a new form ('@@change-member-details') for this.
> form is intended to be renamed to '@@personalize_form' eventually, so it won't
> break anything that relies in that name being there.) Currently it will only
> display the 'fullname' field and update that. Eventually we could extend
> IUserDataSchema so it also includes the extra fields which are currently in
> personalize_form, like description ("Biography"), language, external editor,
> wysiwyg editor, visible id's, etc.
> The code is in a new plone.app.users branch:
> I've added a development buildout which uses this branch:
> (So one can just check out
> https://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0 and run
> buildout -c experimental/user_preferences_form.cfg)
> Note that CMFPlone should remain unchanged for now, until the new forms work.
I've unfortunately let this slip to the bottom of my todo list. I wanted to
bring it here for more discussion and more eyes. I took a quick look at it and
it seemed like a sane approach. I'd appreciate more eyes.
Down the road, I can foresee a management ui that lists all of these fields and
allows us to select to which of these 4 forms they're available.
Framework-Team mailing list