From 9b4bf8334b21393bb0a587ac0a4f0dc342d22bb2 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 11 Mar 2018 17:08:03 +0100 Subject: last minute bugfixes to license order form mechanics. --- website/resources/js/order-license.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'website/resources/js/order-license.js') diff --git a/website/resources/js/order-license.js b/website/resources/js/order-license.js index 4a3edca0..b2842456 100644 --- a/website/resources/js/order-license.js +++ b/website/resources/js/order-license.js @@ -33,7 +33,7 @@ function getPriceIndication() { try { var seats = parseInt($("#seats").val()); - if (isNaN(seats)) return ""; + if (isNaN(seats) || seats < 1) return ""; var licenseType = $("input:radio[name='licenseType']:checked").val(); var costPer; if (licenseType === "enterprise") costPer = 5; @@ -110,7 +110,7 @@ formFail = true; } - if (!data.seats || isNaN(data.seats)) { + if (!data.seats || isNaN(data.seats) || data.seats < 1) { $("#seats").focus(); showError("seats"); formFail = true; -- cgit