<section id="submit-loading">
    <div id="submit-loading-content"></div>
</section>

<script>
    document.addEventListener("DOMContentLoaded", (event) => {
        const forms = document.querySelectorAll('form');

        forms.forEach(form => {
            form.addEventListener('submit', function() {
                document.getElementById('submit-loading').classList.add('ajax-loading');
                document.getElementById('submit-loading-content').classList.add('ajax-loading-content');
            });
        });

        window.addEventListener('load', function() {
            document.getElementById('submit-loading').classList.remove('ajax-loading');
            document.getElementById('submit-loading-content').classList.remove('ajax-loading-content');
        });
    });
</script>
