I've implemented the solution for a User Attributes Entry Form as follows:
All User Attributes defined for the Security Portlet Application (maintainable through the PAM)
are rendered as text input fields using the User Attribute Description as label (note: no i18n here yet).
These fields are rendered in the order they are stored in the database, so if you want to re-order,
you should remove and re-add them in the correct order through the PAM.
An example of User Attribute definitions in the PAM is attached:
I've added an preferences edit mode to the UserDetailsPortlet through which all above mentioned features
can be configured.
The default values provided result in exact the same behavior as it is right now.
But, by defining you own User Attributes (see above) and tuning these preferences like in the following attached screenshot:
you can get a real nice result as shown in the attached screenshots for the new User tab and the Add User form (which will set the default Role and default Profile rule through hidden fields):