Skip to content

Commit

Permalink
Remove react scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
britneywwc committed Feb 23, 2024
1 parent 7555534 commit b0d2d01
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions templates/credentials/shop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
Ubuntu Desktop, and Ubuntu Server topics.{% endblock meta_description %}

{% block content %}
<div id="react-root">
<div class="row u-align--center">
<section class="p-strip">
<div class="row u-align--center">
<div class="col-12 u-no-margin--bottom p-card"><i class="p-icon--spinner u-animation--spin"></i> Loading&hellip;
</div>
</div>
</section>
</div>
</div>

<form onsubmit="handleSubmit(); return false">
<div class="p-strip product-selector">
<div class="row">
Expand Down Expand Up @@ -129,7 +118,6 @@ <h5 id="exam-price" class="u-align--right" style="padding-right: 1rem;">
</p>
</div>
<div class="col-3 col-small-2 u-align--right" style="display: flex;">
<!-- Make it a form submit button -->
<button type="submit" class="p-button--positive" style="margin-block: auto;">
Buy Now
</button>
Expand All @@ -138,9 +126,9 @@ <h5 id="exam-price" class="u-align--right" style="padding-right: 1rem;">
</section>
</form>

<script src="{{ versioned_static('js/dist/credEnterprisePurchasing.js') }}" type="module" defer></script>
<script>
window.stripePublishableKey = "{{ get_stripe_publishable_key }}";
const exams = {{ exams | tojson }};

function currencyFormatter(currency, value) {
const formatter = new Intl.NumberFormat('en-US', {
Expand Down Expand Up @@ -189,7 +177,6 @@ <h5 id="exam-price" class="u-align--right" style="padding-right: 1rem;">
const order = document.querySelectorAll("#order-cart");
const orderName = order[0].getElementsByClassName("order-name")[0];
const orderPrice = order[0].getElementsByClassName("exam-price")[0];
const exams = {{ exams | tojson }};
orderName.innerHTML = exams[exam_index].name;
orderPrice.innerHTML = currencyFormatter(exams[exam_index].price.currency, exams[exam_index].price.value);

Expand All @@ -207,7 +194,6 @@ <h5 id="exam-price" class="u-align--right" style="padding-right: 1rem;">
const handleSubmit = () => {
event.preventDefault();
const index = document.querySelector('input[name="exam-radio"]:checked').value;
const exams = {{ exams | tojson }};

localStorage.setItem(
"shop-checkout-data",
Expand Down

0 comments on commit b0d2d01

Please sign in to comment.