Skip to content

Conversation

@JuanDavidBuitrago
Copy link
Member

@JuanDavidBuitrago JuanDavidBuitrago commented Jul 21, 2023

Description

This PR make a backport from #691

How to test

Microsite settings

   "EDNX_CUSTOM_REGISTRATION_FIELDS": [
       {
           "label": "Document Type",
           "name": "type_document",
           "options": [
               "DNI",
               "PASSPORT",
               "ID"
           ],
           "type": "select"
       },
       {
           "label": "Document Number",
           "name": "personal_id",
           "type": "text"
       },
       {
           "label": "Phone number",
           "name": "mobile",
           "type": "text"
       },
       {
           "label": "Address",
           "name": "address",
           "type": "text"
       },
       {
           "label": "Company Name",
           "name": "company",
           "type": "text"
       }
   ],
   "REGISTRATION_EXTRA_FIELDS": {
       "address": "required",
       "company": "optional",
       "country": "hidden",
       "gender": "required",
       "goals": "hidden",
       "honor_code": "hidden",
       "level_of_education": "hidden",
       "mailing_address": "hidden",
       "mobile": "required",
       "personal_id": "required",
       "terms_of_service": "required",
       "type_document": "required",
       "year_of_birth": "hidden"
   },
   "REGISTRATION_FIELD_ORDER": [
       "gender",
       "type_document",
       "personal_id",
       "email",
       "mobile",
       "address",
       "company"
   ],
   "extended_profile_fields": [
       "type_document",
       "personal_id",
       "mobile",
       "address",
       "company"
   ],
   "OPEN_EDX_FILTERS_CONFIG": {
        "org.openedx.learning.student.registration.render.started.v1": {
            "fail_silently": false,
            "pipeline": [
                "openedx.core.djangoapps.user_authn.views.registration_form.AddCustomFieldsBeforeRegistration"
            ]
        },
        "org.openedx.learning.student.settings.render.started.v1": {
                  "fail_silently": false,
                  "pipeline": [
                      "openedx.core.djangoapps.user_api.accounts.settings_views.AddCustomOptionsOnAccountSettings"
                  ]
              }
          }

Now you look at registration form in /register

image

in /admin/auth/user/
image

In account/settings you should look your custom field types, for this example Type Document as List instead of plain text.

image

@JuanDavidBuitrago JuanDavidBuitrago changed the title feat: add openedx-filters hook to account settings before rendering i… feat(JU-11): add openedx-filters hook to account settings before rendering it context (DS-602) Jul 21, 2023
@JuanDavidBuitrago JuanDavidBuitrago self-assigned this Jul 24, 2023
@JuanDavidBuitrago JuanDavidBuitrago added the olmo-unesco UNESCO project label Jul 24, 2023
@JuanDavidBuitrago JuanDavidBuitrago changed the base branch from ol/ednx/FFI-3 to ednx-release/olmo.unesco July 30, 2023 15:37
Copy link

@Asespinel Asespinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is working as expected.

Copy link

@luisfelipec95 luisfelipec95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@JuanDavidBuitrago JuanDavidBuitrago merged commit c998f7b into ednx-release/olmo.unesco Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

olmo-unesco UNESCO project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants