@page "{id:int}"
@model Admin.Pages.Forum.Board.List.EditModel
@{
    ViewData["Title"] = "게시판 관리 - 기본";
    ViewData["Sector"] = "Edit";
    ViewData["BoardID"] = Model.BoardID;
    ViewData["BoardList"] = Model.BoardList;
    ViewData["QueryString"] = Model.QueryString;
}

<div class="container">
    <partial name="../Meta/_Header" />
    <partial name="_StatusMessage" />
    <partial name="_NavTabs" />

    <form id="fAdminWrite" method="post" accept-charset="utf-8" autocomplete="off">
        <input type="hidden" asp-for="Input.ID" />

        <div class="row mb-2">
            <label for="Input_BoardGroupID" class="col-sm-2 col-form-label"><span>*</span> 게시판 분류</label>
            <div class="col-sm-10">
                <div class="row">
                    <div class="col col-md-auto">
                        <select asp-for="Input.BoardGroupID" class="form-select" required asp-items="@Model.BoardGroupList">
                            <option value="">게시판 분류 선택</option>
                        </select>
                    </div>
                </div>
                <span asp-validation-for="Input.BoardGroupID" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label for="Input_Code" class="col-sm-2 col-form-label"><span>*</span> 주소(Code)</label>
            <div class="col-sm-10">
                <input type="text" asp-for="Input.Code" class="form-control" required maxlength="70" placeholder="중복 시 등록이 불가합니다. 70자 이내" />
                <span asp-validation-for="Input.Code" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label for="Input_Name" class="col-sm-2 col-form-label"><span>*</span> 게시판 명</label>
            <div class="col-sm-10">
                <input type="text" asp-for="Input.Name" class="form-control" required maxlength="70" />
                <span asp-validation-for="Input.Name" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label for="Input_Order" class="col-sm-2 col-form-label"><span>*</span> 순서</label>
            <div class="col-sm-10">
                <input type="number" asp-for="Input.Order" class="form-control" min="-999" max="999" required />
                <span asp-validation-for="Input.Order" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label for="Input_IsSearch" class="col-sm-2 col-form-label">검색 여부</label>
            <div class="col-sm-10 align-content-center">
                <div class="form-check-inline">
                    <input type="checkbox" asp-for="Input.IsSearch" class="form-check-input" />
                    <label class="form-check-label" for="Input_IsSearch">검색에 포함합니다.</label>
                    <span asp-validation-for="Input.IsSearch" class="text-danger"></span>
                </div>
            </div>
        </div>
        <div class="row mb-2">
            <label for="Input_IsActive" class="col-sm-2 col-form-label">사용 여부</label>
            <div class="col-sm-10 align-content-center">
                <div class="form-check-inline">
                    <input type="checkbox" asp-for="Input.IsActive" class="form-check-input" />
                    <label class="form-check-label" for="Input_IsActive">사용합니다.</label>
                    <span asp-validation-for="Input.IsActive" class="text-danger"></span>
                </div>
            </div>
        </div>
        <hr/>
        <div class="d-grid gap-2 text-center d-md-block">
            <button type="submit" class="btn btn-success">저장</button>
            <a href="/Forum/Board/List\@Model.QueryString" class="btn btn-secondary">취소</a>
        </div>
        <br/>
    </form>
</div>