Skip to content

Commit

Permalink
Merge pull request #129 from Pearson-Advance/vue/PADV-1556
Browse files Browse the repository at this point in the history
PADV-1556 Create custom form for registration extra fields.
  • Loading branch information
Nekenhei authored Sep 18, 2024
2 parents 1ac574d + 66471bb commit 4ae1637
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions openedx/core/djangoapps/user_authn/views/registration_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,18 @@ def cleaned_extended_profile(self):

def get_registration_extension_form(*args, **kwargs):
"""
Convenience function for getting the custom form set in settings.REGISTRATION_EXTENSION_FORM.
Convenience function for getting the custom form set in site configurations or plataform settings
REGISTRATION_EXTENSION_FORM.
An example form app for this can be found at http://github.com/open-craft/custom-form-app
Documentation on how to enable this feature can be found on
https://github.com/Pearson-Advance/pearson-core/blob/master/docs/pearson_core_features.md#amazon-custom-registration-form
"""
if not getattr(settings, 'REGISTRATION_EXTENSION_FORM', None):
# No Default valued is passed since we prioritize site configurations over site settings.
registration_extra_form = configuration_helpers.get_value('REGISTRATION_EXTENSION_FORM',
settings.REGISTRATION_EXTENSION_FORM)
if not registration_extra_form:
return None
module, klass = settings.REGISTRATION_EXTENSION_FORM.rsplit('.', 1)
module, klass = registration_extra_form.rsplit('.', 1)
module = import_module(module)
return getattr(module, klass)(*args, **kwargs)

Expand Down

0 comments on commit 4ae1637

Please sign in to comment.