@model MultipleChoiceTrainer.Models.DataModels.Section

@{
    ViewData["Title"] = "Lektion anlegen";
}

<h4>Lektion anlegen</h4>
<hr />
<div class="row">
    <div class="col-md-12">
        <form asp-action="Create">
            <div asp-validation-summary="ModelOnly" class="text-danger"></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="Description" class="control-label"></label>
                <input asp-for="Description" class="form-control" />
                <span asp-validation-for="Description" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Category" class="control-label"></label>
                <select asp-for="CategoryId" class="form-control" asp-items="ViewBag.CategoryId"></select>
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-outline-primary"><i class="fas fa-save"></i> Speichern</button>
                <a asp-action="Index" asp-controller="Home" asp-route-categoryId="@ViewBag.ReturnId" class="btn btn-outline-danger"><i class="fas fa-times"></i> Abbrechen</a>
            </div>
        </form>
    </div>
</div>

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