@extends('admin.layouts.app')

@section('content')
<div class="container-fluid">
    <h2>게시판 관리 - 댓글</h2>
    <hr/>
    @include('admin.messages')
    @if($boardID)
        @include('admin.board.board.navTabs')
    @endif

    <form name="f_admin_write" id="fAdminWrite" method="post" action="{{ $actionURL }}" enctype="multipart/form-data">
        @csrf
        <input type="hidden" name="board_id" value="{{ $boardID }}" />
        <div class="row mb-3">
            <label for="useComment_1" class="col-sm-2">댓글 사용 여부</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment" id="useComment_1" class="form-check-input" value="1" @if($boardMetaData->use_comment ?? old('use_comment')) checked @endif/>
                    <label for="useComment_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment" id="useComment_0" class="form-check-input" value="0" @if(!($boardMetaData->use_comment ?? old('use_comment'))) checked @endif/>
                    <label for="useComment_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    댓글 목록, 사용을 금지합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[use_comment]" id="grpUseComment" class="form-check-input" value="1" />
                    <label for="grpUseComment" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[use_comment]" id="allUseComment" class="form-check-input" value="1" />
                    <label for="allUseComment" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="commentPerPage" class="col-sm-2 col-form-label">댓글 목록 수</label>
            <div class="col-sm-8">
                <input type="text" name="comment_per_page" id="commentPerPage" class="form-control only-digits-input d-inline w-auto" value="{{ $boardMetaData->comment_per_page ?? old('comment_per_page') }}" /> 개
                <div class="form-text text-muted">
                    댓글마다 페이지 넘김, 0이면 페이징 기능 사용하지 않음, (최대 20개)
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[comment_per_page]" id="grpCommentPerPage" class="form-check-input" value="1" />
                    <label for="grpCommentPerPage" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[comment_per_page]" id="allCommentPerPage" class="form-check-input" value="1" />
                    <label for="allCommentPerPage" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="commentPageCount" class="col-sm-2 col-form-label">댓글 페이지 수</label>
            <div class="col-sm-8">
                <input type="text" name="comment_page_count" id="commentPageCount" class="form-control only-digits-input d-inline w-auto" value="{{ $boardMetaData->comment_page_count ?? old('comment_page_count') }}" /> 개
                <div class="form-text text-muted">
                    댓글마다 페이지 넘김, 0이면 페이징 기능 사용하지 않음 (최대 10개)
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[comment_page_count]" id="grpCommentPageCount" class="form-check-input" value="1" />
                    <label for="grpCommentPageCount" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[comment_page_count]" id="allCommentPageCount" class="form-check-input" value="1" />
                    <label for="allCommentPageCount" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="useCommentLike_1" class="col-sm-2">댓글 추천 기능</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_like" id="useCommentLike_1" class="form-check-input" value="1" @if($boardMetaData->use_comment_like ?? old('use_comment_like')) checked @endif/>
                    <label for="useCommentLike_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_like" id="useCommentLike_0" class="form-check-input" value="0" @if(!($boardMetaData->use_comment_like ?? old('use_comment_like'))) checked @endif/>
                    <label for="useCommentLike_0" class="form-check-label">아니오</label>
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[use_comment_like]" id="grpUseCommentLike" class="form-check-input" value="1" />
                    <label for="grpUseCommentLike" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[use_comment_like]" id="allUseCommentLike" class="form-check-input" value="1" />
                    <label for="allUseCommentLike" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="useCommentDislike_1" class="col-sm-2">댓글 비추천 기능</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_dislike" id="useCommentDislike_1" class="form-check-input" value="1" @if($boardMetaData->use_comment_dislike ?? old('use_comment_dislike')) checked @endif/>
                    <label for="useCommentDislike_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_dislike" id="useCommentDislike_0" class="form-check-input" value="0" @if(!($boardMetaData->use_comment_dislike ?? old('use_comment_dislike'))) checked @endif/>
                    <label for="useCommentDislike_0" class="form-check-label">아니오</label>
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[use_comment_dislike]" id="grpUseCommentDislike" class="form-check-input" value="1" />
                    <label for="grpUseCommentDislike" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[use_comment_dislike]" id="allUseCommentDislike" class="form-check-input" value="1" />
                    <label for="allUseCommentDislike" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="showUserThumbInComment_1" class="col-sm-2">회원 프로필 이미지</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="show_user_thumb_in_comment" id="showUserThumbInComment_1" class="form-check-input" value="1" @if($boardMetaData->show_user_thumb_in_comment ?? old('show_user_thumb_in_comment')) checked @endif/>
                    <label for="showUserThumbInComment_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="show_user_thumb_in_comment" id="showUserThumbInComment_0" class="form-check-input" value="0" @if(!($boardMetaData->show_user_thumb_in_comment ?? old('show_user_thumb_in_comment'))) checked @endif/>
                    <label for="showUserThumbInComment_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    작성된 댓글 목록의 좌측에 작성자가 올린 프로필 이미지를 보여줄지를 결정합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[show_user_thumb_in_comment]" id="grpShowUserThumbInComment" class="form-check-input" value="1" />
                    <label for="grpShowUserThumbInComment" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[show_user_thumb_in_comment]" id="allShowUserThumbInComment" class="form-check-input" value="1" />
                    <label for="allShowUserThumbInComment" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="showUserIconInComment_1" class="col-sm-2">회원 아이콘 이미지</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="show_user_icon_in_comment" id="showUserIconInComment_1" class="form-check-input" value="1" @if($boardMetaData->show_user_icon_in_comment ?? old('show_user_icon_in_comment')) checked @endif/>
                    <label for="showUserIconInComment_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="show_user_icon_in_comment" id="showUserIconInComment_0" class="form-check-input" value="0" @if(!($boardMetaData->show_user_icon_in_comment ?? old('show_user_icon_in_comment'))) checked @endif/>
                    <label for="showUserIconInComment_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    회원이 회원 아이콘을 첨부 하였을 경우에, 해당 아이콘이 글쓴이명 좌측에 보일지를 결정합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[show_user_icon_in_comment]" id="grpShowUserIconInComment" class="form-check-input" value="1" />
                    <label for="grpShowUserIconInComment" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[show_user_icon_in_comment]" id="allShowUserIconInComment" class="form-check-input" value="1" />
                    <label for="allShowUserIconInComment" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="updateOrderOnComment_1" class="col-sm-2 col-form-label">댓글 작성시 글 수정 시각 갱신</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="update_order_on_comment" id="updateOrderOnComment_1" class="form-check-input" value="1" @if($boardMetaData->update_order_on_comment ?? old('update_order_on_comment')) checked @endif/>
                    <label for="updateOrderOnComment_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="update_order_on_comment" id="updateOrderOnComment_0" class="form-check-input" value="0" @if(!($boardMetaData->update_order_on_comment ?? old('update_order_on_comment'))) checked @endif/>
                    <label for="updateOrderOnComment_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    댓글이 작성되면 해당 원글의 수정 시각을 갱신합니다. 회의 게시판, 최근 댓글 표시 기능 등에 필요합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[update_order_on_comment]" id="grpUpdateOrderOnComment" class="form-check-input" value="1" />
                    <label for="grpUpdateOrderOnComment" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[update_order_on_comment]" id="allUpdateOrderOnComment" class="form-check-input" value="1" />
                    <label for="allUpdateOrderOnComment" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="commentDefaultContent" class="col-sm-2 col-form-label">댓글 기본 내용</label>
            <div class="col-sm-8">
                <textarea name="comment_default_content" id="commentDefaultContent" class="form-control" rows="5">{{ $boardMetaData->comment_default_content ?? old('comment_default_content') }}</textarea>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[comment_default_content]" id="grpCommentDefaultContent" class="form-check-input" value="1" />
                    <label for="grpCommentDefaultContent" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[comment_default_content]" id="allCommentDefaultContent" class="form-check-input" value="1" />
                    <label for="allCommentDefaultContent" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="commentMinLength" class="col-sm-2 col-form-label">최소 글수 제한</label>
            <div class="col-sm-8">
                <input type="text" name="comment_min_length" id="commentMinLength" class="form-control d-inline w-auto" value="{{ $boardMetaData->comment_min_length ?? old('comment_min_length') }}" /> 개
                <div class="form-text text-muted">
                   0 입력시 제한 없음
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[comment_min_length]" id="grpCommentMinLength" class="form-check-input" value="1" />
                    <label for="grpCommentMinLength" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[comment_min_length]" id="allCommentMinLength" class="form-check-input" value="1" />
                    <label for="allCommentMinLength" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="commentMaxLength" class="col-sm-2 col-form-label">최대 글수 제한</label>
            <div class="col-sm-8">
                <input type="text" name="comment_max_length" id="commentMaxLength" class="form-control d-inline w-auto" value="{{ $boardMetaData->comment_max_length ?? old('comment_max_length') }}" /> 개
                <div class="form-text text-muted">
                    0 입력시 제한 없음
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[comment_max_length]" id="grpCommentMaxLength" class="form-check-input" value="1" />
                    <label for="grpCommentMaxLength" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[comment_max_length]" id="allCommentMaxLength" class="form-check-input" value="1" />
                    <label for="allCommentMaxLength" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="useCommentSecret" class="col-sm-2 col-form-label">비밀글 사용</label>
            <div class="col-sm-8">
                <select name="use_comment_secret" id="useCommentSecret" class="form-select w-auto">
                    <option value="" @if(($boardMetaData->use_comment_secret ?? old('use_comment_secret')) == '') selected @endif>사용하지 않음</option>
                    <option value="1" @if(($boardMetaData->use_comment_secret ?? old('use_comment_secret')) == '1') selected @endif>선택 사용</option>
                    <option value="2" @if(($boardMetaData->use_comment_secret ?? old('use_comment_secret')) == '2') selected @endif>항상 비밀글</option>
                </select>
                <div class="form-text text-muted">
                    비밀글은 작성자 본인과 게시판 관리자 이상만 열람 가능합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[use_comment_secret]" id="grpUseCommentSecret" class="form-check-input" value="1" />
                    <label for="grpUseCommentSecret" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[use_comment_secret]" id="allUseCommentSecret" class="form-check-input" value="1" />
                    <label for="allUseCommentSecret" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="useCommentSecretSelected_1" class="col-sm-2 col-form-label">비밀글 기본 선택</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_secret_selected" id="useCommentSecretSelected_1" class="form-check-input" value="1" @if($boardMetaData->use_comment_secret_selected ?? old('use_comment_secret_selected')) checked @endif/>
                    <label for="useCommentSecretSelected_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_secret_selected" id="useCommentSecretSelected_0" class="form-check-input" value="0" @if(!($boardMetaData->use_comment_secret_selected ?? old('use_comment_secret_selected'))) checked @endif/>
                    <label for="useCommentSecretSelected_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    비밀글 선택 사용 가능 게시판에서 글쓰기시 비밀글 옵션 부분이 기본으로 선택되어 있습니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[use_comment_secret_selected]" id="grpUseCommentSecretSelected" class="form-check-input" value="1" />
                    <label for="grpUseCommentSecretSelected" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[use_comment_secret_selected]" id="allUseCommentSecretSelected" class="form-check-input" value="1" />
                    <label for="allUseCommentSecretSelected" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="showCommentIp" class="col-sm-2 col-form-label">IP 보이기</label>
            <div class="col-sm-8">
                <select name="show_comment_ip" id="showCommentIp" class="form-select w-auto">
                    <option value="">공개하지 않음</option>
                    <option value="1" {{ ($boardMetaData->show_comment_ip ?? old('show_comment_ip')) == '1' ? 'selected' : '' }} >일부 공개 (환경 기본설정에서 정한 방법)</option>
                    <option value="2" {{ ($boardMetaData->show_comment_ip ?? old('show_comment_ip')) == '2' ? 'selected' : '' }} >전체 공개</option>
                </select>
                <div class="form-text text-muted">
                    관리자에게는 IP 가 항상 보입니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[show_comment_ip]" id="grpShowCommentIp" class="form-check-input" value="1" />
                    <label for="grpShowCommentIp" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[show_comment_ip]" id="allShowCommentIp" class="form-check-input" value="1" />
                    <label for="allShowCommentIp" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="useCommentBlame_1" class="col-sm-2">댓글 신고 기능</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_blame" id="useCommentBlame_1" class="form-check-input" value="1" @if($boardMetaData->use_comment_blame ?? old('use_comment_blame')) checked @endif/>
                    <label for="useCommentBlame_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="use_comment_blame" id="useCommentBlame_0" class="form-check-input" value="0" @if(!($boardMetaData->use_comment_blame ?? old('use_comment_blame'))) checked @endif/>
                    <label for="useCommentBlame_0" class="form-check-label">아니오</label>
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[use_comment_blame]" id="grpUseCommentBlame" class="form-check-input" value="1" />
                    <label for="grpUseCommentBlame" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[use_comment_blame]" id="allUseCommentBlame" class="form-check-input" value="1" />
                    <label for="allUseCommentBlame" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="commentBlameBlindCount" class="col-sm-2 col-form-label">댓글 신고 시 숨김</label>
            <div class="col-sm-8">
                <input type="text" name="comment_blame_blind_count" id="commentBlameBlindCount" class="form-control d-inline w-auto" value="{{ $boardMetaData->comment_blame_blind_count ?? old('comment_blame_blind_count') }}" /> 개
                <div class="form-text text-muted">
                    해당 횟수 이상 신고가 발생하면 댓글을 숨김 처리합니다. 숨김된 댓글은 관리자와 본인만 열람이 가능합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[comment_blame_blind_count]" id="grpCommentBlameBlindCount" class="form-check-input" value="1" />
                    <label for="grpCommentBlameBlindCount" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[comment_blame_blind_count]" id="allCommentBlameBlindCount" class="form-check-input" value="1" />
                    <label for="allCommentBlameBlindCount" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="protectDeleteComment_1" class="col-sm-2">댓글 보호 기능 (삭제 시)</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="protect_delete_comment" id="protectDeleteComment_1" class="form-check-input" value="1" @if($boardMetaData->protect_delete_comment ?? old('protect_delete_comment')) checked @endif/>
                    <label for="protectDeleteComment_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="protect_delete_comment" id="protectDeleteComment_0" class="form-check-input" value="0" @if(!($boardMetaData->protect_delete_comment ?? old('protect_delete_comment'))) checked @endif/>
                    <label for="protectDeleteComment_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    답글이 있을 경우 해당 댓글을 삭제할 수 없도록 합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[protect_delete_comment]" id="allProtectDeleteComment" class="form-check-input" value="1" />
                    <label for="allProtectDeleteComment" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[protect_delete_comment]" id="grpProtectDeleteComment" class="form-check-input" value="1" />
                    <label for="grpProtectDeleteComment" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="protectUpdateComment_1" class="col-sm-2">댓글 보호 기능 (수정 시)</label>
            <div class="col-sm-8">
                <div class="form-check form-check-inline">
                    <input type="radio" name="protect_update_comment" id="protectUpdateComment_1" class="form-check-input" value="1" @if($boardMetaData->protect_update_comment ?? old('protect_update_comment')) checked @endif/>
                    <label for="protectUpdateComment_1" class="form-check-label">예</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" name="protect_update_comment" id="protectUpdateComment_0" class="form-check-input" value="0" @if(!($boardMetaData->protect_update_comment ?? old('protect_update_comment'))) checked @endif/>
                    <label for="protectUpdateComment_0" class="form-check-label">아니오</label>
                </div>
                <div class="form-text text-muted">
                    답글이 있을 경우 해당 댓글을 수정할 수 없도록 합니다.
                </div>
            </div>
            <div class="col-sm-2">
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="grp[protect_update_comment]" id="allProtectUpdateComment" class="form-check-input" value="1" />
                    <label for="allProtectUpdateComment" class="form-check-label">
                        그룹적용
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="checkbox" name="all[protect_update_comment]" id="grpProtectUpdateComment" class="form-check-input" value="1" />
                    <label for="grpProtectUpdateComment" class="form-check-label">
                        전체적용
                    </label>
                </div>
            </div>
        </div>
        <hr/>
        <div class="text-end">
            <button type="submit" class="btn btn-success">저장하기</button>
            <button type="button" class="btn btn-light btn-write-cancel" value="{{ route('admin.board.board.list.index') }}">취소하기</button>
        </div>
    </form>
</div>

<script type="module">
$("#fAdminWrite").validate({
    rules: {
        use_comment: {required: true, number: true},
        comment_per_page: {required: true, number: true, min: 0, max: 20},
        comment_page_count: {required: true, number: true, min: 0, max: 10},
        use_comment_like: {required: true, number: true},
        use_comment_dislike: {required: true, number: true},
        show_user_thumb_in_comment: {required: true, number: true},
        show_user_icon_in_comment: {required: true, number: true},
        update_order_on_comment: {required: true, number: true},
        comment_default_content: {required: false, maxlength: 1000},
        comment_min_length: {required: true, number: true, min: 0},
        comment_max_length: {required: true, number: true, max: 99999999},
        use_comment_secret: {required: false, number: true},
        use_comment_secret_selected: {required: true, number: true},
        show_comment_ip: {required: false},
        use_comment_blame: {required: true, number: true},
        comment_blame_blind_count: {required: true, number: true, min: 0},
        protect_delete_comment: {required: true, number: true},
        protect_update_comment: {required: true, number: true}
    }
});
</script>
@endsection
