@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.sms.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="sendSmsRegisterFormContent" class="col-sm-2 col-form-label">회원가입</label>
            <div class="col-sm-10">
                <textarea name="send_sms_register_form_content" id="sendSmsRegisterFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_register_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsChangePwFormContent" class="col-sm-2 col-form-label">비밀번호 변경</label>
            <div class="col-sm-10">
                <textarea name="send_sms_changepw_form_content" id="sendSmsChangePwFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_changepw_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsWithdrawFormContent" class="col-sm-2 col-form-label">회원탈퇴</label>
            <div class="col-sm-10">
                <textarea name="send_sms_withdraw_form_content" id="sendSmsWithdrawFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_withdraw_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsAuthFormContent" class="col-sm-2 col-form-label">이메일 인증</label>
            <div class="col-sm-10">
                <textarea name="send_sms_auth_form_content" id="sendSmsAuthFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_auth_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsFindFormContent" class="col-sm-2 col-form-label">회원정보 찾기</label>
            <div class="col-sm-10">
                <textarea name="send_sms_find_form_content" id="sendSmsFindFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_find_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsPostFormContent" class="col-sm-2 col-form-label">게시글 작성</label>
            <div class="col-sm-10">
                <textarea name="send_sms_post_form_content" id="sendSmsPostFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_post_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsCommentFormContent" class="col-sm-2 col-form-label">댓글 작성</label>
            <div class="col-sm-10">
                <textarea name="send_sms_comment_form_content" id="sendSmsCommentFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_comment_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsPostBlameFormContent" class="col-sm-2 col-form-label">게시글 신고</label>
            <div class="col-sm-10">
                <textarea name="send_sms_post_blame_form_content" id="sendSmsPostBlameFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_post_blame_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsCommentBlameFormContent" class="col-sm-2 col-form-label">댓글 신고</label>
            <div class="col-sm-10">
                <textarea name="send_sms_comment_blame_form_content" id="sendSmsCommentBlameFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_comment_blame_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsPostPersonalFormContent" class="col-sm-2 col-form-label">1:1 문의 접수<br/>(게시글)</label>
            <div class="col-sm-10">
                <textarea name="send_sms_post_personal_form_content" id="sendSmsPostPersonalFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_post_personal_form_content') }}</textarea>
            </div>
        </div>
        <div class="row mb-3">
            <label for="sendSmsPostPersonalReplyFormContent" class="col-sm-2 col-form-label">1:1 문의 답변<br/>(댓글)</label>
            <div class="col-sm-10">
                <textarea name="send_sms_post_personal_reply_form_content" id="sendSmsPostPersonalReplyFormContent" class="form-control bg-light col-sm-3" rows="8">{{ configs('send_sms_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_sms_register_form_content: {required: false},
        send_sms_changepw_form_content: {required: false},
        send_sms_withdraw_form_content: {required: false},
        send_sms_auth_form_content: {required: false},
        send_sms_find_form_content: {required: false},
        send_sms_post_form_content: {required: false},
        send_sms_comment_form_content: {required: false},
        send_sms_post_blame_form_content: {required: false},
        send_sms_comment_blame_form_content: {required: false},
        send_sms_post_personal_form_content: {required: false},
        send_sms_post_personal_reply_form_content: {required: false}
    }
});
</script>
@endsection
