From 9020790cf863dfee0558341b764afb4fb46f8873 Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Tue, 6 Apr 2021 20:35:45 +0200 Subject: [PATCH] move setting of email address to callback --- static/js/order.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/order.js b/static/js/order.js index cad0036..807974d 100644 --- a/static/js/order.js +++ b/static/js/order.js @@ -18,9 +18,6 @@ function validate(what, text) { $(document).ready(function () { var username = $("#username").html(); - if (username != "") { - $("#email").val(username); - } $("#quantity_exclamation").hide(); $("#email_exclamation").hide(); @@ -112,6 +109,9 @@ $(document).ready(function () { function callback() { $('#quantity').focus().select(); + if (username != "") { + $("#email").val(username); + } } setTimeout(callback, 10);