diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d354de2c2c..4b4b347a3e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,7 +17,12 @@ Unreleased ---------- * nothing +[3.42.9] +-------- +feat: add a flag to hide course prices in enrollment page when zero + [3.42.8] +-------- feat: add additional fields to EnterpriseCourseEnrollmentViewSet [3.42.7] diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 2478874dae..dfbb99e9e0 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,6 +2,6 @@ Your project description goes here. """ -__version__ = "3.42.8" +__version__ = "3.42.9" default_app_config = "enterprise.apps.EnterpriseConfig" diff --git a/enterprise/admin/forms.py b/enterprise/admin/forms.py index 8d6c9234af..e69225c068 100644 --- a/enterprise/admin/forms.py +++ b/enterprise/admin/forms.py @@ -398,6 +398,7 @@ class Meta: "enable_audit_data_reporting", "replace_sensitive_sso_username", "hide_course_original_price", + "hide_course_price_when_zero", "enable_portal_code_management_screen", "enable_portal_subscription_management_screen", "enable_learner_portal", diff --git a/enterprise/migrations/0155_auto_20230706_0810.py b/enterprise/migrations/0155_auto_20230706_0810.py new file mode 100644 index 0000000000..afae75b55d --- /dev/null +++ b/enterprise/migrations/0155_auto_20230706_0810.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.15 on 2023-07-06 08:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('enterprise', '0154_alter_systemwideenterpriseuserroleassignment_unique_together'), + ] + + operations = [ + migrations.AddField( + model_name='enterprisecustomer', + name='hide_course_price_when_zero', + field=models.BooleanField(default=False, help_text='Specify whether course cost should be hidden in the landing page when the final price is zero.'), + ), + migrations.AddField( + model_name='historicalenterprisecustomer', + name='hide_course_price_when_zero', + field=models.BooleanField(default=False, help_text='Specify whether course cost should be hidden in the landing page when the final price is zero.'), + ), + ] diff --git a/enterprise/models.py b/enterprise/models.py index 7cdb362fd3..d2bfac1187 100644 --- a/enterprise/models.py +++ b/enterprise/models.py @@ -386,6 +386,11 @@ class Meta: help_text=_("The email address where learner's reply to enterprise emails will be delivered.") ) + hide_course_price_when_zero = models.BooleanField( + default=False, + help_text=_("Specify whether course cost should be hidden in the landing page when the final price is zero.") + ) + @property def enterprise_customer_identity_provider(self): """ diff --git a/enterprise/templates/enterprise/enterprise_course_enrollment_page.html b/enterprise/templates/enterprise/enterprise_course_enrollment_page.html index 1d4a777bdf..efb644a519 100644 --- a/enterprise/templates/enterprise/enterprise_course_enrollment_page.html +++ b/enterprise/templates/enterprise/enterprise_course_enrollment_page.html @@ -77,19 +77,21 @@