@extends('admin.layouts.app')

@section('content')
<div class="container-fluid">
    <h2>쪽지 양식</h2>
    <hr/>
    @include('admin.messages')
    @include('admin.config.form.navTabs')

    <form name="f_admin_write" id="fAdminWrite" method="post" action="{{ route('admin.config.form.note.store') }}" enctype="multipart/form-data">
        @csrf
        <div class="alert alert-success" role="alert">
            <p><strong>*치환가능변수</strong></p>
            <p>{홈페이지명}, {회사명}, {홈페이지주소}, {회원아이디}, {회원닉네임}, {회원실명}, {회원이메일}, {메일인증주소}, {메일수신여부}, {쪽지수신여부}, {문자수신여부}, {회원아이피}</p>
            <p>{메일수신여부}, {쪽지수신여부}, {문자수신여부} 는 동의, 거부 - 이 2개 중 하나로 치환됩니다.</p>
            <p>{회원아이피} 는 회원가입시 접속한 실제 IP 로 치환됩니다.</p>
            <p>{메일인증주소} 는 이메일 인증기능을 사용하는 설정 하에, 회원에게 보내는 메일에만 치환 기능이 작동합니다.</p>
        </div>
        <div class="row mb-3">
            <label for="sendNoteRegisterFormContent" class="col-sm-2 col-form-label">회원가입</label>
            <div class="col-sm-10">
                <textarea name="send_note_register_form_content" id="sendNoteRegisterFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_register_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNoteChangePwFormContent" class="col-sm-2 col-form-label">비밀번호 변경</label>
            <div class="col-sm-10">
                <textarea name="send_note_changepw_form_content" id="sendNoteChangePwFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_changepw_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNoteWithdrawFormContent" class="col-sm-2 col-form-label">회원탈퇴</label>
            <div class="col-sm-10">
                <textarea name="send_note_withdraw_form_content" id="sendNoteWithdrawFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_withdraw_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNoteAuthFormContent" class="col-sm-2 col-form-label">이메일 인증</label>
            <div class="col-sm-10">
                <textarea name="send_note_auth_form_content" id="sendNoteAuthFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_auth_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNoteFindFormContent" class="col-sm-2 col-form-label">회원정보 찾기</label>
            <div class="col-sm-10">
                <textarea name="send_note_find_form_content" id="sendNoteFindFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_find_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNotePostFormContent" class="col-sm-2 col-form-label">게시글 작성</label>
            <div class="col-sm-10">
                <textarea name="send_note_post_form_content" id="sendNotePostFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_post_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNoteCommentFormContent" class="col-sm-2 col-form-label">댓글 작성</label>
            <div class="col-sm-10">
                <textarea name="send_note_comment_form_content" id="sendNoteCommentFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_comment_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNotePostBlameFormContent" class="col-sm-2 col-form-label">게시글 신고</label>
            <div class="col-sm-10">
                <textarea name="send_note_post_blame_form_content" id="sendNotePostBlameFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_post_blame_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNoteCommentBlameFormContent" class="col-sm-2 col-form-label">댓글 신고</label>
            <div class="col-sm-10">
                <textarea name="send_note_comment_blame_form_content" id="sendNoteCommentBlameFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_comment_blame_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNotePostPersonalFormContent" class="col-sm-2 col-form-label">1:1 문의 접수<br/>(게시글)</label>
            <div class="col-sm-10">
                <textarea name="send_note_post_personal_form_content" id="sendNotePostPersonalFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_post_personal_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendNotePostPersonalReplyFormContent" class="col-sm-2 col-form-label">1:1 문의 답변<br/>(댓글)</label>
            <div class="col-sm-10">
                <textarea name="send_note_post_personal_reply_form_content" id="sendNotePostPersonalReplyFormContent" class="form-control bg-light" rows="11">{{ configs('send_note_post_personal_reply_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="text-end">
            <button type="submit" class="btn btn-success">저장하기</button>
        </div>
    </form>
</div>

<script type="module">
$("#fAdminWrite").validate({
    rules: {
        send_note_register_form_content: {required: false},
        send_note_changepw_form_content: {required: false},
        send_note_withdraw_form_content: {required: false},
        send_note_auth_form_content: {required: false},
        send_note_find_form_content: {required: false},
        send_note_post_form_content: {required: false},
        send_note_comment_form_content: {required: false},
        send_note_post_blame_form_content: {required: false},
        send_note_comment_blame_form_content: {required: false},
        send_note_post_personal_form_content: {required: false},
        send_note_post_personal_reply_form_content: {required: false}
    }
});
</script>
@endsection
