@model FastBlog.Web.Controllers.UsersController.LoginModel
@{
    ViewData["Title"] = "Login";
}
<div id="login-form" class="container">
    <article >
        <form
            hx-post="/users/login"
            hx-swap="outerHTML"
            hx-target="#login-form">
            <div>
                <label for="login">Login:</label>
                <input type="text" id="login" name="login" value="@Model.Login"
                       minlength="3"
                       maxlength="10"
                       required>
            </div>
            <div>
                <label for="login">Password:</label>
                <input type="password" id="password" name="password" value="@Model.Password"
                       minlength="3"
                       required>
            </div>
            <div>
                <button type="submit">
                    <span>Login</span>
                </button>
            </div>
            @foreach (var error in Model.Errors)
            {
                <div class="alert alert-caution">
                    <p>@error</p>
                </div>
            }
        </form>
    </article>
</div>