2023-05-17 22:15:18 +04:00
|
|
|
@using SchoolAgainStudyContracts.ViewModel;
|
|
|
|
@model DiyViewModel
|
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Setting";
|
|
|
|
}
|
|
|
|
<div class="text-center">
|
|
|
|
<h2 class="display-4">@Model.Title</h2>
|
|
|
|
</div>
|
|
|
|
<form method="post" action="@Url.Action("UpdateDiy", "Home", new{idDiy=Model.Id,title="#title",description="#description", dateCreate="#dateCreate",task="#task",interests="#interests"})">
|
|
|
|
<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("DeleteDiy","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 m-3">
|
|
|
|
<div class="col-4">Описание:</div>
|
2023-05-18 00:03:47 +04:00
|
|
|
<div class="col-8"><textarea cols="50" id="description" name="description" rows="5">@Model.Description</textarea></div>
|
2023-05-17 22:15:18 +04:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">Дата создания:</div>
|
2023-05-18 00:03:47 +04:00
|
|
|
<div class="col-8">@Html.TextBox("dateCreate", Model.DateCreate.Date.ToString("yyyy-MM-dd"),new {type="Date"})</div>
|
2023-05-17 22:15:18 +04:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">Задание:</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<select id="task" name="task" class="form-control" asp-items="@(new SelectList(@ViewBag.Tasks,"Id", "Title"))"></select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">Интересы:</div>
|
|
|
|
<div class="col-8">
|
|
|
|
@Html.ListBox("interests", (MultiSelectList)ViewBag.Interests)
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|