<style type="text/css">
    .input {
        height: 33px !important;
    }
</style>
<form class="row g-3 auto-width license documents_management" action="{{ route('documents-management.store')}}" method="post" enctype='multipart/form-data'>
    @csrf
    <div class="col-md-12">
        <label for="attachment" class="form-label">Document </label>
        <input type="file" class="form-control input" id="attachment" name="attachment" aria-describedby="inputGroupPrepend" required>
        <span class="text-danger error_attachment" style="display: none;">This field is required.</span>
    </div>
    @if(isset($account_id) && $account_id != '')
        <input type="hidden" id="account_id" name="account_id" required value="{!! $account_id !!}">
    @endif
    @if(isset($voucher) && $voucher != '')
        <input type="hidden" id="voucher_type" name="voucher_type" required value="{!! $voucher !!}">
    @else
        <div class="col-md-12">
            <label for="voucher_type" class="form-label">Voucher Type <span class="text-danger"><b>*</b></span></label>
            <select class="form-select" name="voucher_type">
                <option value="">-Select-</option>
                @foreach($voucher_type as $value)
                    <option value="{!! $value->code !!}">{!! $value->name !!}</option>
                @endforeach
            </select>
            <span class="text-danger error_voucher_type" style="display: none;">This field is required.</span>
        </div>
    @endif
    <div class="col-md-12" style="display: none">
        <label for="priority" class="form-label">Priority <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control input" id="priority" name="priority" aria-describedby="inputGroupPrepend" required value="{!! $priority !!}">
        <span class="text-danger error_priority" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="date_from" class="form-label">Document Note </label>
        <textarea class="form-control" name="document_note" id="document_note" rows="5" cols="3"></textarea>
        <span class="text-danger error_document_note" style="display: none;">This field is required.</span>
    </div>
</form>
