From 5df2080f92fd2622b02b3f716517318433168c76 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 26 Sep 2018 09:09:12 +0200 Subject: [PATCH] Reset amount and recurring fields on error --- hosting/static/hosting/js/payment.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosting/static/hosting/js/payment.js b/hosting/static/hosting/js/payment.js index 7ba20aed..52dd511a 100644 --- a/hosting/static/hosting/js/payment.js +++ b/hosting/static/hosting/js/payment.js @@ -47,6 +47,8 @@ $(document).ready(function () { } }, error: function (xmlhttprequest, textstatus, message) { + $("#id_generic_payment_form-amount").val(''); + $('#id_generic_payment_form-recurring').prop('checked', false); console.log("Error fetching product") } });