<script>
    $(() => {
        $(".btn-save").on('click', function(e) {
            e.preventDefault();

            $("#formjawaban").parsley().validate();

            if ($("#formjawaban").parsley().isValid()) {
                $("#formjawaban").trigger('submit');
            }
        });
    });
</script>
<x-modal-layout class="modal-dialog-centered modal-lg">
    <x-forms.form method="POST" action="{{ $method }}" id="formjawaban" class="action-form" onsubmit="btnLoading('{!! __('messages.saving_state') !!}')" novalidate>
        @csrf
        <x-forms.form-help :mode="$updateMode" />
        <div class="form-group">
            <x-forms.label for="jawaban" :value="__('lang.jawaban')" />
            <textarea class="form-control" id="jawaban" name="jawaban" rows="3" placeholder="{{ __('lang.place_data', ['data' => __('lang.jawaban')]) }}">{{ ($Permohonan->jawaban !== NULL)?$Permohonan->jawaban:"" }}</textarea>
        </div>
    </x-forms.form>
    <x-slot name="footer">
        <button class="btn btn-primary btn-loading btn-save">{{ __('lang.save') }}</button>
    </x-slot>
</x-modal-layout>
