@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" action="{{ route('admin.config.form.telegram.store') }}" method="post" enctype="multipart/form-data">
        @csrf
        <div class="alert alert-success" role="alert">
            <p><strong>*치환가능변수</strong></p>
            <p>{홈페이지명}, {회사명}, {홈페이지주소}, {회원아이디}, {회원이름}, {회원이메일}, {메일인증주소}, {인증번호}, {회원아이피}</p>
            <p>{회원아이피} 는 회원가입시 접속한 실제 IP 로 치환됩니다.</p>
            <p>{메일인증주소} 는 이메일 인증기능을 사용하는 설정 하에, 회원에게 보내는 메일에만 치환 기능이 작동합니다.</p>
        </div>
        <div class="row mb-3">
            <label for="sendTelegramRegisterFormContent" class="col-sm-2 col-form-label">회원가입</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_register_form_content" id="sendTelegramRegisterFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_register_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramChangePwFormContent" class="col-sm-2 col-form-label">비밀번호 변경</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_changepw_form_content" id="sendTelegramChangePwFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_changepw_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramWithdrawFormContent" class="col-sm-2 col-form-label">회원탈퇴</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_withdraw_form_content" id="sendTelegramWithdrawFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_withdraw_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramAuthFormContent" class="col-sm-2 col-form-label">이메일 인증</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_auth_form_content" id="sendTelegramAuthFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_auth_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramVerifyCodeFormContent" class="col-sm-2 col-form-label">인증번호</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_telegram_form_content" id="sendTelegramVerifyCodeFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_telegram_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramFindFormContent" class="col-sm-2 col-form-label">회원정보 찾기</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_find_form_content" id="sendTelegramFindFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_find_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramPostFormContent" class="col-sm-2 col-form-label">게시글 작성</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_post_form_content" id="sendTelegramPostFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_post_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramPostCommentFormContent" class="col-sm-2 col-form-label">댓글 작성</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_post_comment_form_content" id="sendTelegramPostCommentFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_post_comment_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramPostBlameFormContent" class="col-sm-2 col-form-label">게시글 신고</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_post_blame_form_content" id="sendTelegramPostBlameFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_post_blame_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramPostCommentBlameFormContent" class="col-sm-2 col-form-label">댓글 신고</label>
            <div class="col-sm-10">
                <textarea name="send_telegram_post_comment_blame_form_content" id="sendTelegramPostCommentBlameFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_post_comment_blame_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_telegram_register_form_content : {'required_tinymce' : true},
        send_telegram_changepw_form_content : {'required_tinymce' : true},
        send_telegram_withdraw_form_content : {'required_tinymce' : true},
        send_telegram_auth_form_content : {'required_tinymce' : true},
        send_telegram_telegram_form_content : {'required_tinymce' : true},
        send_telegram_find_form_content : {'required_tinymce' : true},
        send_telegram_post_form_content : {'required_tinymce' : true},
        send_telegram_post_comment_form_content : {'required_tinymce' : true},
        send_telegram_post_blame_form_content : {'required_tinymce' : true},
        send_telegram_post_comment_blame_form_content : {'required_tinymce' : true}
    }
});
</script>
@endsection
