38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
@using SchoolAgainStudyContracts.ViewModel;
|
|
@model LessonViewModel
|
|
@{
|
|
ViewData["Title"] = "Setting";
|
|
}
|
|
<div class="text-center">
|
|
<h2 class="display-4">@Model.Title</h2>
|
|
</div>
|
|
<form method="post" action="@Url.Action("UpdateLesson", "Home", new{idLesson=Model.Id, title="#title", dateEvent="#dateEvent", product="#product", materials="#materials"})">
|
|
<div class="row m-3">
|
|
<div class="col-8">
|
|
<input type="submit" value="Обновить" class="col-md-4 btn btn-primary" />
|
|
<input type="button" class="col-md-4 ms-auto btn btn-danger" value="Удалить" onclick="location.href='@Url.Action("DeleteLesson","Home", new {id=Model.Id })'" />
|
|
</div>
|
|
</div>
|
|
<div class="row m-3">
|
|
<div class="col-4">Название:</div>
|
|
<div class="col-8"><input type="text" name="title" id="title" value="@Model.Title" /></div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-4">Дата проведения:</div>
|
|
<div class="col-8">@Html.TextBox("dateEvent", Model.DateEvent.Date.ToString("yyyy-MM-dd"),new {type="Date"})</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-4">Изделие:</div>
|
|
<div class="col-8">
|
|
<select id="product" name="product" class="form-control" asp-items="@(new SelectList(@ViewBag.Products,"Id", "Title", Model.ProductId))"></select>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-4">Материалы:</div>
|
|
<div class="col-8">
|
|
@Html.ListBox("materials", (MultiSelectList)ViewBag.Materials)
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|