Skip to content

Commit

Permalink
fix: reorganizing enterprise customer django admin (#1791)
Browse files Browse the repository at this point in the history
* fix: reorganizing enterprise customer django admin and addressing test and lint errors

---------

Co-authored-by: Yuanyuan Zhao <[email protected]>
  • Loading branch information
yuanyuan-git-tech and Yuanyuan Zhao authored Jul 11, 2023
1 parent f4e0fdb commit d14b10e
Show file tree
Hide file tree
Showing 4 changed files with 521 additions and 145 deletions.
46 changes: 46 additions & 0 deletions enterprise/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,52 @@ class EnterpriseCustomerAdmin(DjangoObjectActions, SimpleHistoryAdmin):
list_filter = ('active',)
ordering = ('name',)
search_fields = ('name', 'uuid',)

fieldsets = (
('Enterprise info', {
'fields': ('name', 'active', 'slug', 'auth_org_id', 'country')
}),
('Subsidy management screens ', {
'fields': ('enable_portal_learner_credit_management_screen',
'enable_portal_subscription_management_screen',
'enable_portal_code_management_screen'),
'description': ("Select the check boxes below to enable specific subsidy management screens"
"on the organization's administrator portal. If an option is left unchecked,"
"the customer administrator will not see the screen in their portal"
"and will not be able to apply the associated configurations via self-service.")
}),
('Subsidy settings', {
'fields': ('enable_browse_and_request', 'enable_universal_link'),
'description': ('Select the check boxes below to enable specific subsidy management settings'
'for the administrator portal for subscription and codes customers.'
'These should not be selected for customers that only have learner credit.')
}),
('Data sharing consent', {
'fields': ('enable_data_sharing_consent', 'enforce_data_sharing_consent')
}),
('Email and language ', {
'fields': ('contact_email', 'reply_to', 'sender_alias', 'default_language', 'hide_labor_market_data')
}),
('Reporting', {
'fields': ('enable_portal_reporting_config_screen',)
}),
('Integration and learning platform settings', {
'fields': ('enable_portal_lms_configurations_screen', 'enable_portal_saml_configuration_screen',
'enable_slug_login', 'replace_sensitive_sso_username', 'hide_course_original_price')
}),
('Recommended default settings for all enterprise customers', {
'fields': ('site', 'customer_type', 'enable_learner_portal',
'enable_integrated_customer_learner_portal_search',
'enable_analytics_screen', 'enable_audit_enrollment',
'enable_audit_data_reporting', 'enable_learner_portal_offers',
'enable_executive_education_2U_fulfillment'),
'description': ('The following default settings should be the same for '
'the majority of enterprise customers,'
'and are either rarely used, unlikely to be sold, '
'or unlikely to be changed from the default.')
}),
)

inlines = [
EnterpriseCustomerBrandingConfigurationInline,
EnterpriseCustomerIdentityProviderInline,
Expand Down
Loading

0 comments on commit d14b10e

Please sign in to comment.