@model Anidopt.Models.Animal

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

<h1>Edit</h1>

<h4>Animal</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form asp-action="Edit">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="form-group">
                <label asp-for="Id" class="control-lanel"></label>
                <input disabled asp-for="Id" class="form-control" />
            </div>
            <div class="form-group">
                <label asp-for="Name" class="control-label"></label>
                <input asp-for="Name" class="form-control" />
                <span asp-validation-for="Name" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="BirthDay" class="control-label"></label>
                <input asp-for="BirthDay" class="form-control" />
                <span asp-validation-for="BirthDay" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Breed.Species" class="control-label"></label>
                <select id="species-select" asp-for="Breed.SpeciesId" class="form-control" asp-items="@ViewBag.Species"></select>
            </div>
            <div class="form-group">
                <label asp-for="Breed" class="control-label"></label>
                <select id="breed-select" asp-for="BreedId" class="form-control" asp-items="@ViewBag.Breeds"></select>
            </div>
            <div class="form-group">
                <label asp-for="Height" class="control-label"></label>
                <input asp-for="Height" class="form-control" />
                <span asp-validation-for="Height" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Weight" class="control-label"></label>
                <input asp-for="Weight" class="form-control" />
                <span asp-validation-for="Weight" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Sex" class="control-label"></label>
                <select asp-for="SexId" class="form-control" asp-items="@ViewBag.Sexes"></select>
            </div>
            <div class="form-group">
                <label asp-for="Organisation" class="control-label"></label>
                <select asp-for="OrganisationId" class="form-control" asp-items="@ViewBag.Organisations"></select>
            </div>
            <div class="form-group">
                <label asp-for="Description" class="control-label"></label>
                <textarea asp-for="Description" class="form-control"></textarea>
                <span asp-validation-for="Description" 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-action="Index">Back to List</a>
</div>

@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
    <script src="/js/SpeciesBreedSelectUpdater.js", type="text/javascript"></script>
}
