<div class="container py-3">
    <div class="card">
        <div class="card-header">Legacy AJAX hiba teszt</div>
        <div class="card-body">
            <form id="legacy-error-form" action="{{ route('legacy.test.submit') }}" method="post">
                @csrf
                <div class="mb-3 field field_message">
                    <label for="message" class="form-label">Üzenet</label>
                    <input type="text" id="message" name="message" value="Create Error" class="form-control" />
                    <div class="msg small text-muted"></div>
                </div>
                <div class="cnt_button">
                    <button type="submit" class="btn btn-primary submit">Beküldés</button>
                    <span class="formmsg ms-2"></span>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    (function(){
        $('#legacy-error-form').ajaxdataform({
            ajaxtype: 'POST',
            datatype: 'json',
            beforepost: function () { return true; },
            afterpost: function () {}
        });
    })();
</script>
