stop the generic disabling function from re-enabling "post" button

pull/160/head
Aevann 2023-06-30 18:54:39 +03:00
parent c616636ff0
commit 7851b66962
2 changed files with 3 additions and 2 deletions

View File

@ -104,7 +104,8 @@ for (const element of TH) {
const btns_to_disable = document.querySelectorAll('[type="submit"]')
for (const element of btns_to_disable) {
element.addEventListener('click', () => {disable_btn(element)})
if (!element.className.contains("donotdisable"))
element.addEventListener('click', () => {disable_btn(element)})
}
function disable_btn(t) {

View File

@ -101,7 +101,7 @@
<progress max="100"></progress>
<span></span>
</span>
<button type="submit" class="btn btn-primary" id="submit-btn" type="submit">Post</button>
<button type="submit" class="btn btn-primary donotdisable" id="submit-btn" type="submit">Post</button>
</div>
</div>
</div>