mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPR: Disable AJAX form buttons on submission process
This commit is contained in:
parent
cd8d976e16
commit
11383ff5aa
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react",
|
||||
"version": "5.1.5",
|
||||
"version": "5.1.6",
|
||||
"description": "This UI Kit allows you to build Bootstrap 5 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
||||
"author": "Tony Air <tony@twma.pro>",
|
||||
"license": "BSD-2-Clause",
|
||||
|
@ -12,6 +12,11 @@ const submitForm = (e) => {
|
||||
console.log(`${NAME}: submit`)
|
||||
const data = new FormData(form);
|
||||
const parent = form.parentElement;
|
||||
const btns = form.querySelectorAll('input[type="submit"],button')
|
||||
|
||||
btns.forEach(el => {
|
||||
el.setAttribute('disabled', 'disabled')
|
||||
})
|
||||
|
||||
data.append('ajax', '1')
|
||||
form.classList.add('loading')
|
||||
|
Loading…
Reference in New Issue
Block a user