Skip to content
Snippets Groups Projects
Unverified Commit 592b34b9 authored by Dave St.Germain's avatar Dave St.Germain Committed by GitHub
Browse files

Merge pull request #21158 from eduNEXT/lmm/add_currency_choose_template

Setting template to show currency defined in the course mode DB record
parents 61506831 2dd128bc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment