<!-- common -->
<div id="loginModal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Sign In</h4>
            </div>
            <div class="modal-body">
                <div class="alert alert-warning">
                    <p>Your session has expired, please use the form below to sign back in!</p>
                </div>
                <div id="loginError" class='alert alert-danger'>The Username of Password entered is incorrect.
                </div>

                <div class="form-group">
                    <label for="username">Username</label>
                    <input type="text" name="username" value="" id="username" class="form-control"
                        placeholder="Username" />
                </div>
                <div class="form-group">
                    <label for="password">Password:</label>
                    <input type="password" name="password" value="" id="password" class="form-control"
                        placeholder="Password" />
                </div>
            </div>
            <div class="modal-footer">
                <a id="ajaxLoginbtn" class="btn btn-primary">Sign In</a>
            </div>
        </div>
    </div>
</div>

<!-- grace content list -->
<div class="modal fade cm-submenuchange-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenuchange-modal"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content modal-lg">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">컨텐츠 서브메뉴 변경</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form class="row">
                    <div class="form-group col-md-10">
                        <label class="col-form-label col-md-2">서브메뉴:</label>
                        <select class="btn btn-default col-md-4 cm-subchg-category-select">
                            <option value="">서브메뉴</option>
                            <?php foreach ($graceCategories as $category) {echo '<option value="' . $category->idx . '">' . $category->category_name . '</option>';}?>
                        </select>
                        <label class="col-form-label col-md-2">에디터:</label>
                        <select class="btn btn-default col-md-4 cm-subchg-editor-select">
                            <option value="">에디터</option>
                            <?php foreach ($graceEditors as $editor) {echo '<option value="' . $editor->editorId . '">' . $editor->editorName . '</option>';}?>
                        </select>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary cm-submenuchange-save">저장</button>
            </div>
        </div>
    </div>
</div>

<!-- grace category -->
<div class="modal fade cm-submenu-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenu-modal"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">서브메뉴 추가</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <input type="hidden" name="id" class="cm-submenu-cateogryid">
                    <div class="form-group">
                        <label class="col-form-label">카테고리명:</label>
                        <input type="text" class="form-control cm-submenu-categoryname">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">출력순서:</label>
                        <input type="number" class="form-control cm-submenu-dporder">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary cm-submenu-save">저장</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade cm-editdp-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">

            <div class="modal-body">


                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href=".cm-set-content-dptime" aria-controls="home"
                            role="tab" data-toggle="tab">예약관리</a></li>
                    <li role="presentation"><a href=".cm-set-content-display" aria-controls="profile" role="tab"
                            data-toggle="tab" data-name="grace">송출관리</a></li>
                    <li role="presentation"><a href=".cm-reg-content-grace" aria-controls="profile" role="tab"
                            data-toggle="tab">은혜충전 등록</a></li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content cm-tab-content">
                    <div role="tabpanel" class="tab-pane active cm-set-content-dptime">
                        <form action="/adm/support/upload" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                <label class="col-form-label">컨텐츠:</label>
                                <input type="text" class="form-control cm-set-dptime-content-title" readonly>
                            </div>  
                            <div class="form-group">
                                <label class="col-form-label">예약시간:</label>
                                <input type="text" class="form-control cm-set-dptime">
                            </div>                            
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                            <button type="button" class="btn btn-primary">저장</button>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane cm-set-content-display">
                        <form action="/adm/content/upload" method="post" enctype="multipart/form-data">
                            <div class="form-group row">
                                <label class="checkbox-inline">
                                    <input type="radio" value="home" class="cm-set-content-dp-part"
                                        name="dp_part" checked> 홈
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="submenu-top" class="cm-set-content-dp-part"
                                        name="dp_part" checked> 서브메뉴 상단
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="home-dailyqt" class="cm-set-content-dp-part"
                                        name="dp_part"> 데일리QT
                                </label>
                            </div>
                            <div class="form-group row cm-config-display cm-config-add">
                                <div style="margin-left:15px">
                                    <i class="glyphicon glyphicon-edit cm-saved-config-dp-edit-icon"></i>
                                    <select class="btn btn-default cm-saved-config-dp-edit-btn">
                                        <option value="">선택</option>
                                        <option value="edit">수정</option>
                                        <option value="delete">삭제</option>
                                    </select>
                                    <input type="number" class="form-control cm-set-content-order">
                                </div>
                                <div class="col-md-3">
                                    <input type="text" class="form-control cm-set-content-title-head" placeholder="말머리">
                                </div>
                                <div class="col-md-6" style="padding:0">
                                    <input type="text" class="form-control cm-set-content-title" placeholder="제목">
                                </div>
                            </div>
                            <div class="form-group">
                                <div><img src="" class="cm-uploaded-img"></div>
                                <input type="file" name="userfile" class="cm-upload-file">
                            </div>
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                            <button type="button" class="btn btn-primary">저장</button>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane cm-reg-content-grace">
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                            <button type="button" class="btn btn-primary">저장</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade cm-displayhome-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label class="col-form-label">표시 제목:</label>
                        <input type="text" class="form-control cm-submenu-categoryname">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">이미지:</label>
                        <input type="text" class="form-control cm-submenu-dporder">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">컨텐츠 검색:</label>
                        <input type="button" class="btn btn-info">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary">저장</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade cm-displaysection-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label class="col-form-label">표시 제목:</label>
                        <input type="text" class="form-control cm-submenu-categoryname">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">이미지:</label>
                        <input type="text" class="form-control cm-submenu-dporder">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">컨텐츠 검색:</label>
                        <input type="button" class="btn btn-info">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary">저장</button>
            </div>
        </div>
    </div>
</div>