PopulateTools / decidim-module-extra_user_fields

Add dynamic custom fields to users
https://decidim.org
GNU Affero General Public License v3.0
3 stars 13 forks source link

[Feature] - Allow admin to enable / disable extra user fields #9

Closed Quentinchampenois closed 2 years ago

Quentinchampenois commented 2 years ago

Description

This PR implements the possibility for admins to enable / disable extra user fields in the signup form. Also, admins can choose which field available to add to the registration form.

When the extra user field is enabled, and at least one field is selected, a new section will be add to the registration form and account form.

Related to

Issue #8, see issue for screenshots

How to test

  1. Add the migration to the application (it creates a new column extra_user_fields to the organizations table)
  2. Log in as admin, and go to Settings > Manage extra user fields
  3. Enable the extra user field and at least one field
  4. Go to registration form, see the fields
  5. Go to account form, see the new fields

Information

The choice of Hash for field in the jsonb column seems to me easier for future needs.

Tasks

Additionnal information

Feel free to suggest or ask for changes.

Thanks

ferblape commented 2 years ago

Add documentation for creating a new field => I am thinking about adding documentation in another PR, because there is a lot of steps I think having a task for create skeleton of new field can be interesting ?

OK, it makes sense, we are not going to make a release yet.

BTW, is this PR compatible with 0.26 and 0.27?

Quentinchampenois commented 2 years ago

Add documentation for creating a new field => I am thinking about adding documentation in another PR, because there is a lot of steps I think having a task for create skeleton of new field can be interesting ?

OK, it makes sense, we are not going to make a release yet.

BTW, is this PR compatible with 0.26 and 0.27?

I did not try with 0.27, I will, but to me it should be fully compatible