@page
@model Admin.Pages.Config.Basic.IndexModel

@{
    ViewData["Title"] = "기본 설정";
}

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

    <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" autocomplete="off" accept-charset="UTF-8">
        <div class="row mb-2">
            <label asp-for="Input.Basic.SiteName" class="col-sm-2 col-form-label">관리자 제목</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.SiteName" class="form-control" maxlength="100" />
                <span asp-validation-for="Input.Basic.SiteName" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.SiteURL" class="col-sm-2 col-form-label">사이트 주소</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.SiteURL" type="url" class="form-control" maxlength="100" />
                <div class="form-text text-muted">웹 서비스 주소를 지정합니다.</div>
                <span asp-validation-for="Input.Basic.SiteURL" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.FromEmail" class="col-sm-2 col-form-label">송수신 이메일</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.FromEmail" type="email" class="form-control" maxlength="100" />
                <div class="form-text text-muted">관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다.</div>
                <span asp-validation-for="Input.Basic.FromEmail" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.FromName" class="col-sm-2 col-form-label">송수신자 이름</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.FromName" class="form-control" maxlength="30" />
                <div class="form-text text-muted">관리자가 보내고 받는 용도로 사용하는 메일의 발송자 이름을 입력합니다.</div>
                <span asp-validation-for="Input.Basic.FromName" class="text-danger"></span>
            </div>
        </div>

        <hr />

        <div class="row mb-2">
            <label asp-for="Input.Basic.SmtpServer" class="col-sm-2 col-form-label">SMTP Server</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.SmtpServer" class="form-control" maxlength="200" />
                <span asp-validation-for="Input.Basic.SmtpServer" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.SmtpPort" class="col-sm-2 col-form-label">SMTP Port</label>
            <div class="col-sm-10 col-md-3">
                <input asp-for="Input.Basic.SmtpPort" type="number" class="form-control" max="65535" />
                <span asp-validation-for="Input.Basic.SmtpPort" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.SmtpEnableSSL" class="col-sm-2 col-form-label">SMTP Enable SSL</label>
            <div class="col-sm-10 align-content-center">
                <div class="form-check">
                    <input asp-for="Input.Basic.SmtpEnableSSL" class="form-check-input" />
                    <label class="form-check-label" for="Input_Basic_SmtpEnableSSL">사용</label>
                </div>
                <span asp-validation-for="Input.Basic.SmtpEnableSSL" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.SmtpUsername" class="col-sm-2 col-form-label">SMTP Username</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.SmtpUsername" class="form-control" maxlength="100" />
                <span asp-validation-for="Input.Basic.SmtpUsername" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.SmtpPassword" class="col-sm-2 col-form-label">SMTP Password</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.SmtpPassword" type="password" class="form-control" maxlength="200" />
                <span asp-validation-for="Input.Basic.SmtpPassword" class="text-danger"></span>
            </div>
        </div>

        <hr />

        <div class="row mb-2">
            <label asp-for="Input.Basic.AdminWhiteIPList" class="col-sm-2 col-form-label">관리자단 접근 가능 IP</label>
            <div class="col-sm-10">
                <div class="form-text text-muted pb-2">
                    해당 IP 에서만 관리자 페이지에 접근이 가능합니다. <br />
                    IP 주소 입력형식 <br />
                    1. 와일드카드 (*) 사용가능(예: 192.168.0.*) <br />
                    2. 하이픈 (-)을 사용하여 대역으로 입력가능 <br />
                    (단, 대역폭으로 입력할 경우 와일드카드 사용불가. 예: 192.168.0.1 ~ 192.168.0.254) <br />
                    3. 여러개의 항목은 줄을 바꾸어 입력하세요.
                </div>

                <textarea asp-for="Input.Basic.AdminWhiteIPList" class="form-control" rows="3" maxlength="1000"></textarea>
                <div class="form-text text-muted">해당 IP 에서만 관리자에 접근이 가능합니다.</div>
                <span asp-validation-for="Input.Basic.AdminWhiteIPList" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.FrontWhiteIPList" class="col-sm-2 col-form-label">사용자단 접근 가능 IP</label>
            <div class="col-sm-10">
                <textarea asp-for="Input.Basic.FrontWhiteIPList" class="form-control" rows="2" maxlength="1000"></textarea>
                <div class="form-text text-muted">해당 IP 에서만 사이트에 접근이 가능합니다.</div>
                <span asp-validation-for="Input.Basic.FrontWhiteIPList" class="text-danger"></span>
            </div>
        </div>

        <hr />

        <div class="row mb-2">
            <label asp-for="Input.Basic.BlockAlertTitle" class="col-sm-2 col-form-label">차단 시 안내문 제목</label>
            <div class="col-sm-10">
                <input asp-for="Input.Basic.BlockAlertTitle" class="form-control" maxlength="200" />
                <span asp-validation-for="Input.Basic.BlockAlertTitle" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.BlockAlertContent" class="col-sm-2 col-form-label">차단 시 안내문 내용</label>
            <div class="col-sm-10">
                <textarea asp-for="Input.Basic.BlockAlertContent" id="blockAlertContent" class="ck-editor"></textarea>
                <span asp-validation-for="Input.Basic.BlockAlertContent" class="text-danger"></span>
            </div>
        </div>

        <hr />

        <div class="row mb-2">
            <label asp-for="Input.Basic.IsMaintenance" class="col-sm-2 col-form-label">점검 여부</label>
            <div class="col-sm-10 align-content-center">
                <div class="form-check-inline">
                    <input asp-for="Input.Basic.IsMaintenance" class="form-check-input" />
                    <label class="form-check-label" for="Input_Basic_IsMaintenance">점검을 진행합니다.</label>
                </div>
                <span asp-validation-for="Input.Basic.IsMaintenance" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Basic.MaintenanceContent" class="col-sm-2 col-form-label">점검 내용</label>
            <div class="col-sm-10">
                <textarea asp-for="Input.Basic.MaintenanceContent" id="maintenanceContent" class="ck-editor"></textarea>
                <span asp-validation-for="Input.Basic.MaintenanceContent" class="text-danger"></span>
            </div>
        </div>

        <hr />

        <div class="row">
            <div class="col text-center p-3">
                <button type="submit" class="btn btn-success">저장하기</button>
            </div>
        </div>

        <br />
    </form>
</div>

@section Scripts {
    @{

    }
}