@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>{SITE_NAME}, {CORP_NAME}, {SITE_URL}, {MEMBER_ID}, {MEMBER_NAME}, {MEMBER_EMAIL}, {IP_ADDR}</p>
        </div>
        <div class="row mb-3">
            <label for="sendTelegramCrawlingFormContent" class="col-md-2 col-form-label">영화 정보 수집 시</label>
            <div class="col-md">
                <textarea name="send_telegram_crawling_form_content" id="sendTelegramCrawlingFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_crawling_form_content') }}</textarea>
            </div>
        </div>
        <hr/>
        <div class="row mb-3">
            <label for="sendTelegramDaliyVisitsFormContent" class="col-md-2 col-form-label">일 방문 통계</label>
            <div class="col-md-10">
                <textarea name="send_telegram_daliy_visits_form_content" id="sendTelegramDaliyVisitsFormContent" class="form-control bg-light col-sm-3" rows="8">{{ config('send_telegram_daliy_visits_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_crawling_form_content : { required : true },
            send_telegram_daliy_visits_form_content : { required : true }
        }
    });
</script>
@endsection
