From 2c3e1893c2b811f4d167af18703518c3de9a33d8 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 11 Sep 2021 16:55:22 +1000 Subject: [PATCH] Set toggle correctly on back button --- .../portal/ninja2020/subscriptions/ninja_plan.blade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/views/portal/ninja2020/subscriptions/ninja_plan.blade.php b/resources/views/portal/ninja2020/subscriptions/ninja_plan.blade.php index adebc313df..33376bac5d 100644 --- a/resources/views/portal/ninja2020/subscriptions/ninja_plan.blade.php +++ b/resources/views/portal/ninja2020/subscriptions/ninja_plan.blade.php @@ -15,7 +15,7 @@ input:checked ~ .dot { background-color: #48bb78; } -
+

Choose your plan @@ -222,6 +222,10 @@ input:checked ~ .dot { var users_yearly = 'LYqaQWldnj'; var users_monthly = '7LDdwRb1YK'; +document.getElementById("toggleB").checked = false; + +console.log(document.getElementById("toggleB").value); + document.getElementById('users_yearly').addEventListener('change', function() { users_yearly = this.value; document.getElementById('y_plan_price').innerHTML = price_map.get(this.value); @@ -234,10 +238,12 @@ document.getElementById('users_monthly').addEventListener('change', function() { }); document.getElementById('handleYearlyClick').addEventListener('click', function() { + document.getElementById("toggleB").checked = false; location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/' + users_yearly + '/purchase'; }); document.getElementById('handleMonthlyClick').addEventListener('click', function() { + document.getElementById("toggleB").checked = false; location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/' + users_monthly + '/purchase'; }); @@ -253,6 +259,7 @@ price_map.set('kQBeX6mbyK', '$260'); price_map.set('GELe32Qd69', '$360'); price_map.set('MVyb86oevA', '$440'); + @endpush