diff options
author | Frederick Muriuki Muriithi | 2025-01-15 10:08:44 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-01-15 10:10:14 -0600 |
commit | b8726483575707444fd327d641782a09a6a6b27e (patch) | |
tree | fac168c9290bdc03056d5cb835eeeb7f74e2a808 /uploader/templates/phenotypes/add-phenotypes-raw-files.html | |
parent | 81a8136f0844e43b1d0ce1059b1263fc9fd53d5b (diff) | |
download | gn-uploader-b8726483575707444fd327d641782a09a6a6b27e.tar.gz |
Disable "Upload Phenotypes" button on click; reenable on error.
Disable the button when the user clicks the button, and only re-enable
it iff an upload error occurs.
Diffstat (limited to 'uploader/templates/phenotypes/add-phenotypes-raw-files.html')
-rw-r--r-- | uploader/templates/phenotypes/add-phenotypes-raw-files.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html index 568cf0b..ccdbde5 100644 --- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html +++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html @@ -577,6 +577,7 @@ var uploadError = () => { return (message, file) => { + $("#frm-add-phenotypes input[type=submit]").attr("disabled") console.log("THE FILE:", file); console.log("THE ERROR MESSAGE:", message); }; @@ -643,6 +644,7 @@ // TODO: Verify that files are not duplicated // TODO: Check all fields // Start the uploads. + event.target.setAttribute("disabled", "disabled"); resumables.forEach((r) => {r.upload();}); }); </script> |