Skip to content

ju/ednx/JU-11: Fix custom registration - #458

Merged
mariajgrimaldi merged 1 commit into
ednx/juniper+edunextfrom
ju/ednx/JU-11
Nov 30, 2020
Merged

ju/ednx/JU-11: Fix custom registration#458
mariajgrimaldi merged 1 commit into
ednx/juniper+edunextfrom
ju/ednx/JU-11

Conversation

@mariajgrimaldi

@mariajgrimaldi mariajgrimaldi commented Nov 20, 2020

Copy link
Copy Markdown
Contributor

This PR adds the ability to customize the registration form using settings.

For example:

If we want to add the field Pet name we would have to do the following:

  1. Create a definition dictionary for our custom field:
        {
            "errorMessages": {
                "required": "Add your pet name."
            },
            "instruction": "Your pet name",
            "label": "Pet name",
            "name": "pet_name",
            "restrictions": {
                "max_length": 10,
                "min_length": 3
            },
            "type": "text"
        }
  1. Add that dictionary to EDNX_CUSTOM_REGISTRATION_FIELDS
  2. Add name to extended_profile_fields
  3. Add name to REGISTRATION_EXTRA_FIELDS with the value optional or required
    "REGISTRATION_EXTRA_FIELDS": {
        "city": "hidden",
        "confirm_email": "hidden",
        "country": "hidden",
        "gender": "optional",
        "goals": "optional",
        "honor_code": "required",
        "level_of_education": "optional",
        "mailing_address": "optional",
        "pet_name": "required",
        "specialty": "required",
        "terms_of_service": "hidden",
        "year_of_birth": "optional"
    }
  1. Optional: if you want to specify: REGISTRATION_FIELD_ORDER

@mariajgrimaldi mariajgrimaldi changed the title ju/ednx/JU-1: Fix custom registration ju/ednx/JU-11: Fix custom registration Nov 20, 2020
Comment thread openedx/core/djangoapps/user_api/accounts/settings_views.py Outdated
Comment thread openedx/core/djangoapps/user_api/accounts/settings_views.py Outdated
Comment thread openedx/core/djangoapps/user_api/accounts/settings_views.py
Comment thread openedx/core/djangoapps/user_api/accounts/settings_views.py
Comment thread openedx/core/djangoapps/user_api/accounts/settings_views.py Outdated
Comment thread openedx/core/djangoapps/user_api/accounts/settings_views.py Outdated
Comment thread openedx/core/djangoapps/user_authn/views/registration_form.py Outdated
Comment thread openedx/core/djangoapps/user_authn/views/registration_form.py Outdated
@mariajgrimaldi mariajgrimaldi changed the title ju/ednx/JU-11: Fix custom registration [WIP] ju/ednx/JU-11: Fix custom registration Nov 20, 2020
@mariajgrimaldi
mariajgrimaldi force-pushed the ju/ednx/JU-11 branch 4 times, most recently from 641f67b to 82a0008 Compare November 24, 2020 17:19
@mariajgrimaldi mariajgrimaldi changed the title [WIP] ju/ednx/JU-11: Fix custom registration ju/ednx/JU-11: Fix custom registration Nov 24, 2020
@mariajgrimaldi
mariajgrimaldi force-pushed the ju/ednx/JU-11 branch 5 times, most recently from bb2c74e to 6ca5e05 Compare November 27, 2020 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants