From 9711fb7e8006072ffac7acb95b8c3a1c26322ffc Mon Sep 17 00:00:00 2001 From: usamabinnadeem-10 Date: Mon, 3 Jun 2024 14:32:05 +0500 Subject: [PATCH] fix(bulk purchase): WD-11785 fix broken buy button --- templates/credentials/shop/keys.html | 190 +++++++++++++-------------- 1 file changed, 93 insertions(+), 97 deletions(-) diff --git a/templates/credentials/shop/keys.html b/templates/credentials/shop/keys.html index fee8c25d039..1ec379a7128 100644 --- a/templates/credentials/shop/keys.html +++ b/templates/credentials/shop/keys.html @@ -3,129 +3,125 @@ {% block title %}Canonical Credentials -- Your exams{% endblock %} {% block meta_description %} - The Canonical Ubuntu Essentials exams certify knowledge and verify skills in general Linux, - Ubuntu Desktop, and Ubuntu Server topics. + The Canonical Ubuntu Essentials exams certify knowledge and verify skills in general Linux, + Ubuntu Desktop, and Ubuntu Server topics. {% endblock meta_description %} {% block meta_copydoc %} - https://docs.google.com/document/d/1QuhO-9FEOGLrYp8bErS_9snqdljl7d6tFAUoNQxoVDQ/edit + https://docs.google.com/document/d/1QuhO-9FEOGLrYp8bErS_9snqdljl7d6tFAUoNQxoVDQ/edit {% endblock meta_copydoc %} {% block content %} -
+
-
+
-

How many exam attempts do you need?

+

How many exam attempts do you need?

-
+
+ +
+ +
+ +
+ + + +
+ +
-
+
+ +
-
+

+ Each exam attempt allows you to register for one or more of the + following certifications: -

+
    - +
  • CUE.01 Linux
  • - +
  • CUE.02 Desktop
  • -
+
  • CUE.03 Server
  • -
    + -
    +

    + +
    +
    +
    -

    - Each exam attempt allows you to register for one or more of the - following certifications: +

    + +
    Your Order
    + +
    -
      +
      -
    • CUE.01 Linux
    • +
      0 x Exam attempt key
      -
    • CUE.02 Desktop
    • +
      $0.00
      -
    • CUE.03 Server
    • +
      -
    + -

    +
    -
    -
    - -
    - -
    Your Order
    - -
    - -
    - -
    0 x Exam attempt key
    - -
    $0.00
    - -
    - - - -
    - -
    -
    - - + productPrice = formatter.format(productPrice); + document.getElementById("order_price").innerHTML = productPrice; + document.getElementById("order_quantity").innerHTML = inputQuantity + " x Exam attempt key"; + + if (inputQuantity < 1) { + document.getElementById("form-submit").disabled = true; + } else { + document.getElementById("form-submit").disabled = false; + } + }; + + document.addEventListener("DOMContentLoaded", () => { + updateOrderSummary(); + }); + {% endblock content %}