mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-03 20:12:59 +00:00
Add files via upload
This commit is contained in:
@@ -710,9 +710,20 @@ async function loadBanner() {
|
||||
}
|
||||
}
|
||||
|
||||
// Add submission flag at the top of the script
|
||||
let isSubmitting = false;
|
||||
|
||||
async function saveBanner(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Prevent multiple submissions
|
||||
if (isSubmitting) {
|
||||
console.log('Form submission already in progress');
|
||||
return;
|
||||
}
|
||||
|
||||
isSubmitting = true;
|
||||
|
||||
const form = document.getElementById('bannerForm');
|
||||
const formData = new FormData(form);
|
||||
const submitButton = form.querySelector('button[type="submit"]');
|
||||
@@ -809,6 +820,7 @@ async function saveBanner(event) {
|
||||
submitButton.disabled = false;
|
||||
submitButton.innerHTML = originalButtonText;
|
||||
}
|
||||
isSubmitting = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user