@extends('admin.layouts.app')

@section('content')
<div class="container-fluid">
    <h2>문자 발송 확인</h2>
    <hr/>
    @include('admin.messages')
    @include('admin.config.test.navTabs')

    <form name="f_admin_write" id="fAdminWrite" method="post" action="{{ route('admin.config.test.sms.store') }}" enctype="multipart/form-data">
        @csrf
        <div class="alert alert-primary" role="alert">
            현재 SMS 문자가 정상적으로 발송되고 있는지 테스트할 수 있는 페이지입니다. <br/>
            아래 입력란에 수신 번호를 입력 후에 문자를 발송해주세요.
        </div>
        <div class="row mb-3">
            <label class="col-sm-2">보내는 번호</label>
            <div class="col-sm-10">
                <div class="form-group">
                    {{ $smsNumber }}
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="receiveNumber" class="col-sm-2 col-form-label">받는 번호</label>
            <div class="col-sm-10">
                <div class="form-label">
                    <input type="text" name="receive_number" id="receiveNumber" class="form-control" value="{{ old('receive_number') }}"/>
                </div>
                <div class="form-help text-muted">예시) 010-0000-0000</div>
            </div>
        </div>
        <hr/>
        <div class="text-end">
            <button type="submit" class="btn btn-success">저장하기</button>
        </div>
    </form>
</div>

<script type="module">
$("#fAdminWrite").validate({
    rules: {
        receive_number: {required: true, is_phone: true}
    }
});
</script>
@endsection
