@page
@model Admin.Pages.Crypto.News.WriteModel
@{
    ViewData["Title"] = "RSS 소스 등록";
}

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

    <partial name="_StatusMessage" />

    <form id="fAdminWrite" method="post" accept-charset="utf-8" autocomplete="off" class="mt-3">
        @Html.AntiForgeryToken()

        <div class="row mb-2">
            <label asp-for="Input.Name" class="col-sm-2 col-form-label">
                <span class="text-danger">*</span> 이름
            </label>
            <div class="col-sm-10">
                <input asp-for="Input.Name" class="form-control" maxlength="200" required placeholder="CoinSpeaker KR" />
                <span asp-validation-for="Input.Name" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Url" class="col-sm-2 col-form-label">
                <span class="text-danger">*</span> URL
            </label>
            <div class="col-sm-10">
                <input asp-for="Input.Url" class="form-control" maxlength="2048" required placeholder="https://example.com/rss" />
                <span asp-validation-for="Input.Url" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.Description" class="col-sm-2 col-form-label">설명</label>
            <div class="col-sm-10">
                <textarea asp-for="Input.Description" class="form-control" rows="3" maxlength="500" placeholder="소스에 대한 설명"></textarea>
                <span asp-validation-for="Input.Description" class="text-danger"></span>
            </div>
        </div>

        <div class="row mb-2">
            <label asp-for="Input.IntervalMinutes" class="col-sm-2 col-form-label">
                <span class="text-danger">*</span> 수집주기(분)
            </label>
            <div class="col-sm-10">
                <input asp-for="Input.IntervalMinutes" type="number" class="form-control" min="1" max="1440" required />
                <div class="form-text">1~1440분 (기본 10분)</div>
                <span asp-validation-for="Input.IntervalMinutes" class="text-danger"></span>
            </div>
        </div>

        <hr />

        <div class="d-grid gap-2 text-center d-md-block">
            <button type="submit" class="btn btn-success">저장</button>
            <a href="/Crypto/News" class="btn btn-secondary">취소</a>
        </div>

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