@page
@model HtmxNotes.Pages.EditNoteModel

@{
    ViewData["Title"] = "EditNote";
}

<h1>EditNote</h1>

<h4>Note</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form method="post">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <input type="hidden" asp-for="Note.Id" />
            <div class="form-group">
                <label asp-for="Note.Text" class="control-label"></label>
                <input asp-for="Note.Text" class="form-control" />
                <span asp-validation-for="Note.Text" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Note.CreatedDate" class="control-label"></label>
                <input asp-for="Note.CreatedDate" class="form-control" />
                <span asp-validation-for="Note.CreatedDate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <input type="submit" value="Save" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-page="./Index">Back to List</a>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
