Skip to content

Commit

Permalink
refactor: change the pattern for show the link that redirect to sku b…
Browse files Browse the repository at this point in the history
…asket
  • Loading branch information
anfbermudezme committed Dec 13, 2021
1 parent c048c0f commit c9b2bd8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ <h1>
</a>
</span>
<p class="tip">
You must successfully complete <a href="${ecommerce_payment_page}?sku=${student_not_enrollment_in_requirement}">${Text(_("{prc_display}")).format(
prc_display=course_requirements['display'])}</a> before you begin this course.
${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format(
link_start=HTML('<a href="${ecommerce_payment_page}?sku=${student_not_enrollment_in_requirement}">'),
link_end=HTML('</a>'),
prc_display=course_requirements['courses'][0]['display'],
)}
</p>
</li>
%else:
Expand All @@ -241,11 +244,11 @@ <h1>
## Multiple pre-requisite courses are not supported on frontend that's why we are pulling first element
<span class="important-dates-item-text pre-requisite"><a href="${prc_target}">${course_requirements['display']}</a></span>
<p class="tip">
${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format(
link_start=HTML('<a href="{}">').format(prc_target),
link_end=HTML('</a>'),
prc_display=course_requirements['display'],
)}
${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format(
link_start=HTML('<a href="{}">').format(prc_target),
link_end=HTML('</a>'),
prc_display=course_requirements['display'],
)}
</p>
</li>
%endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,15 @@ <h4 class="message-title">${_('Your current verification will expire soon.')}</h
% if course_requirements:
% if student_not_enrollment_in_requirement:
## Multiple pre-requisite courses are not supported on frontend that's why we are pulling first element

<div class="prerequisites">
You must successfully complete <a href="${ecommerce_payment_page}?sku=${student_not_enrollment_in_requirement}">${Text(_("{prc_display}")).format(
prc_display=course_requirements['courses'][0]['display'])}</a> before you begin this course.
<p class="tip">
${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format(
link_start=HTML('<a href="${ecommerce_payment_page}?sku=${student_not_enrollment_in_requirement}">'),
link_end=HTML('</a>'),
prc_display=course_requirements['courses'][0]['display'],
)}
</p>
</div>
%else:
## Multiple pre-requisite courses are not supported on frontend that's why we are pulling first element
Expand Down

0 comments on commit c9b2bd8

Please sign in to comment.