diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index ccbed449f9ba3476d997b05ee5f383b181411749..6569e245f6276c6e3296e1bc95080bd5ecf2c9b2 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -13,6 +13,7 @@ import six.moves.urllib.parse import six.moves.urllib.request import waffle from babel.dates import format_datetime +from babel.numbers import get_currency_symbol from django.contrib.auth.decorators import login_required from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest @@ -208,6 +209,7 @@ class ChooseModeView(View): price_before_discount = verified_mode.min_price context["currency"] = verified_mode.currency.upper() + context["currency_symbol"] = get_currency_symbol(verified_mode.currency.upper()) context["min_price"] = price_before_discount context["verified_name"] = verified_mode.name context["verified_description"] = verified_mode.description diff --git a/lms/templates/course_modes/_upgrade_button.html b/lms/templates/course_modes/_upgrade_button.html index c4482ab82c87b3f2ec1577b0ecc3af71117d059a..4e4e976ab4dac64f1124c7cfb0c51771cc845af5 100644 --- a/lms/templates/course_modes/_upgrade_button.html +++ b/lms/templates/course_modes/_upgrade_button.html @@ -17,9 +17,9 @@ from openedx.core.djangolib.markup import HTML, Text <span>${_('Pursue a Verified Certificate')}</span> % endif % if price_before_discount: - (<span class="upgrade-price-string">$${min_price} USD</span> <del> <span class="upgrade-price-string">${Text('${price} USD').format(price=price_before_discount)}</span></del>) + (<span class="upgrade-price-string">${currency_symbol}${min_price} ${currency}</span> <del> <span class="upgrade-price-string">${Text('{currency_symbol}{price} {currency}').format(currency_symbol=currency_symbol, price=price_before_discount, currency=currency)}</span></del>) % else: - (<span class="upgrade-price-string">$${min_price} USD</span>) + (<span class="upgrade-price-string">${currency_symbol}${min_price} ${currency}</span>) % endif </button> </li> \ No newline at end of file diff --git a/lms/templates/course_modes/choose.html b/lms/templates/course_modes/choose.html index 20ee9dcaf4687efab9f7f8ae358da9c9a9391ba1..e931208c60aad4d3e45828ccf80eef068bfc3c74 100644 --- a/lms/templates/course_modes/choose.html +++ b/lms/templates/course_modes/choose.html @@ -124,7 +124,7 @@ from openedx.core.djangolib.markup import HTML, Text </div> <div class="copy-inline list-actions"> <ul class="list-actions"> - <%include file='_upgrade_button.html' args='content_gating_enabled=content_gating_enabled, course_duration_limit_enabled=course_duration_limit_enabled, min_price=min_price, price_before_discount=price_before_discount' /> + <%include file='_upgrade_button.html' args='content_gating_enabled=content_gating_enabled, course_duration_limit_enabled=course_duration_limit_enabled, currency=currency, currency_symbol=currency_symbol, min_price=min_price, price_before_discount=price_before_discount' /> </ul> </div> </div> @@ -165,7 +165,7 @@ from openedx.core.djangolib.markup import HTML, Text </div> <div class="copy-inline list-actions"> <ul class="list-actions"> - <%include file='_upgrade_button.html' args='content_gating_enabled=content_gating_enabled, course_duration_limit_enabled=course_duration_limit_enabled, min_price=min_price, price_before_discount=price_before_discount' /> + <%include file='_upgrade_button.html' args='content_gating_enabled=content_gating_enabled, course_duration_limit_enabled=course_duration_limit_enabled, currency=currency, currency_symbol=currency_symbol, min_price=min_price, price_before_discount=price_before_discount' /> </ul> </div> </div>