feat: add JS for upgrade button redirect in Track Selection (#28805)

REV-2387
This commit is contained in:
julianajlk
2021-09-21 13:34:10 -04:00
committed by GitHub
parent 5487ff5906
commit 94378cb06c
2 changed files with 15 additions and 1 deletions

View File

@@ -20,7 +20,6 @@
background-color: white;
border: 1px solid #707070;
position: relative;
float: right;
}
.track-selection-certificate {
@@ -240,6 +239,10 @@
.price-display {
font-size: 14px;
}
.choice-bullets {
padding: 0 2rem 1rem 1rem;
}
}
@media (min-width: map-get($grid-breakpoints, 'md')) {

View File

@@ -16,6 +16,17 @@ from openedx.core.djangolib.js_utils import js_escaped_string
<%block name="js_extra">
<script type="text/javascript">
// upgrade button re-direct to ecommerce basket (which re-directs to Payment MFE)
% if use_ecommerce_payment_flow:
$(function(){
$('button[name=verified_mode]').click(function(e){
e.preventDefault();
window.location.href = '${ecommerce_payment_page | n, js_escaped_string}?sku=' +
encodeURIComponent('${sku | n, js_escaped_string}');
});
});
% endif
// popover icon toggle
$(function(){
$('body').click(function (e) {