@page
@model Admin.Pages.Document.WriteModel
@{
    ViewData["Title"] = "문서 생성";
}

<div class="container">
    <h3>@ViewData["Title"]</h3>
    <hr />

    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <partial name="_StatusMessage" />
    <partial name="_Editor" />

    <form name="f_admin_write" id="fAdminWrite" class="mt-3" method="post" accept-charset="utf-8" autocomplete="off">
        <div class="row mb-2">
            <label asp-for="Input.Code" class="col-sm-2 col-form-label"><span class="text-danger">*</span> 주소</label>
            <div class="col-sm-10">
                @Model.SiteUrl/docs/<input type="text" asp-for="Input.Code" class="form-control d-inline w-auto" required />
                <span asp-validation-for="Input.Code" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label asp-for="Input.Subject" class="col-sm-2 col-form-label"><span>*</span> 제목</label>
            <div class="col-sm-10">
                <input asp-for="Input.Subject" class="form-control" required />
                <span asp-validation-for="Input.Subject" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label asp-for="Input.Content" class="col-sm-2 col-form-label">내용</label>
            <div class="col-sm-10">
                <textarea asp-for="Input.Content" class="form-control ck-editor"></textarea>
                <span asp-validation-for="Input.Content" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-2">
            <label asp-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" asp-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="/Document?@Model.QueryString" class="btn btn-secondary">취소</a>
        </div>
        <br />
    </form>
</div>