miniflux/ui/static/js/form_handler.js
2018-07-05 22:18:51 -07:00

15 lines
451 B
JavaScript

class FormHandler {
static handleSubmitButtons() {
let elements = document.querySelectorAll("form");
elements.forEach((element) => {
element.onsubmit = () => {
let button = document.querySelector("button");
if (button) {
button.innerHTML = button.dataset.labelLoading;
button.disabled = true;
}
};
});
}
}