From 3fe5873634b4206241ffa9fc03b863b2a5bb9cd4 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 11 Feb 2022 01:47:43 -0900 Subject: [PATCH] Layout prices as simple table --- app/purser/css/purser.css | 14 ++++++++++++++ app/purser/hosted-form.html | 32 ++++++++++++++++++++++++++++---- app/purser/js/payment.js | 3 +++ 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/app/purser/css/purser.css b/app/purser/css/purser.css index 04150c6..d1f7459 100644 --- a/app/purser/css/purser.css +++ b/app/purser/css/purser.css @@ -44,3 +44,17 @@ button { display: none; transition: all 0.5s; } + + section#ptable { + display: table; + width: 30%; + margin-bottom: 2rem; + } + + section#ptable > * { + display: table-row; + } + + section#ptable .col { + display: table-cell; + } diff --git a/app/purser/hosted-form.html b/app/purser/hosted-form.html index bc03b2a..9ccbabd 100644 --- a/app/purser/hosted-form.html +++ b/app/purser/hosted-form.html @@ -15,10 +15,34 @@

Payment

Select products for payment:

- - - - +
+
+
+
Price
+
+
+
+ + +
+
$575.04
+
+
+
+ + +
+
$12,999.96
+
+
+
+ + +
+
$150.00
+
+
+
diff --git a/app/purser/js/payment.js b/app/purser/js/payment.js index 605d867..2b1a15a 100644 --- a/app/purser/js/payment.js +++ b/app/purser/js/payment.js @@ -23,6 +23,9 @@ function calc_total() { if (document.getElementById('dataoneplus').checked) { total += prices().dataoneplus; } + if (document.getElementById('hastorage').checked) { + total += prices().hastorage; + } return(total); }