FleetCart/Modules/User/Resources/assets/admin/js/auth.js
2023-12-03 14:07:47 +00:00

18 lines
368 B
JavaScript

import jQuery from "jquery";
window.$ = window.jQuery = jQuery;
$("[data-loading]").on("click", (e) => {
let button = $(e.currentTarget);
if (button.is("i")) {
button = button.parent();
}
button
.addClass("btn-loading")
.attr("disabled", "disabled")
.parents("form")
.trigger("submit");
});