Spaces:
Running
Running
Michael Natanael
commited on
Commit
·
499cbc6
1
Parent(s):
40d728a
fix disable cancelBtn
Browse files- templates/index.html +3 -1
templates/index.html
CHANGED
@@ -118,7 +118,9 @@
|
|
118 |
form.addEventListener('submit', function (e) {
|
119 |
const cancelBtn = this.querySelector('[type="button"]');
|
120 |
const submitBtn = this.querySelector('[type="submit"]');
|
121 |
-
cancelBtn
|
|
|
|
|
122 |
submitBtn.disabled = true;
|
123 |
submitBtn.innerHTML = `
|
124 |
<svg aria-hidden="true" role="status" class="inline w-4 h-4 me-3 text-white animate-spin" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
118 |
form.addEventListener('submit', function (e) {
|
119 |
const cancelBtn = this.querySelector('[type="button"]');
|
120 |
const submitBtn = this.querySelector('[type="submit"]');
|
121 |
+
if (cancelBtn) {
|
122 |
+
cancelBtn.disabled = true;
|
123 |
+
}
|
124 |
submitBtn.disabled = true;
|
125 |
submitBtn.innerHTML = `
|
126 |
<svg aria-hidden="true" role="status" class="inline w-4 h-4 me-3 text-white animate-spin" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|