source: PostgreSqlDotnetCore/Views/Pets/Edit.cshtml@ 784b3ad

main
Last change on this file since 784b3ad was 2aea0fd, checked in by ElenaMoskova <elena.moskova99@…>, 4 months ago

init commit Elena

  • Property mode set to 100644
File size: 3.2 KB
Line 
1@model PostgreSqlDotnetCore.Models.PetsClass
2
3@{
4 ViewBag.Title = "Edit";
5}
6
7<h2>Edit</h2>
8
9
10@using (Html.BeginForm())
11{
12 @Html.AntiForgeryToken()
13
14<div class="form-horizontal">
15 <h4>PetsClass</h4>
16 <hr />
17 @Html.ValidationSummary(true, "", new { @class = "text-danger" })
18 @Html.HiddenFor(model => model.id)
19
20 <div class="form-group">
21 @Html.LabelFor(model => model.color, htmlAttributes: new { @class = "control-label col-md-2" })
22 <div class="col-md-10">
23 @Html.EditorFor(model => model.color, new { htmlAttributes = new { @class = "form-control" } })
24 @Html.ValidationMessageFor(model => model.color, "", new { @class = "text-danger" })
25 </div>
26 </div>
27 <div class="form-group">
28 @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
29 <div class="col-md-10">
30 @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
31 @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
32 </div>
33 </div>
34 @* <div class="form-group">
35 @Html.LabelFor(model => model.dateofbirthday, htmlAttributes: new { @class = "control-label col-md-2" })
36 <div class="col-md-10">
37 @Html.EditorFor(model => model.dateofbirthday, new { htmlAttributes = new { @class = "form-control" } })
38 @Html.ValidationMessageFor(model => model.dateofbirthday, "", new { @class = "text-danger" })
39 </div>
40 </div> *@
41
42 <div class="form-group">
43 <label asp-for="dateofbirthday" class="control-label"></label>
44 <input asp-for="dateofbirthday" class="form-control" type="date" />
45 <span asp-validation-for="dateofbirthday" class="text-danger"></span>
46 </div>
47
48@* <div class="form-group">
49 @Html.LabelFor(model => model.typeofpetsid, htmlAttributes: new { @class = "control-label col-md-2" })
50 <div class="col-md-10">
51 @Html.EditorFor(model => model.typeofpetsid, new { htmlAttributes = new { @class = "form-control" } })
52 @Html.ValidationMessageFor(model => model.typeofpetsid, "", new { @class = "text-danger" })
53 </div>
54 </div> *@
55 <div class="form-group">
56 <label class="control-label col-md-2" for="typeofpetsid">Type:</label>
57 <div class="col-md-10 ">
58
59 <select class="form-control" id="typeofpetsid" name="typeofpetsid">
60 <option value="">Select type</option>
61 <option value="1">Cat</option>
62 <option value="2">Dog</option>
63 @* <option value="3">Dog</option>
64 <option value="4">Cat</option>
65 <option value="5">Dog</option> *@
66 <!-- Додадете ги другите улоги како опции според вашата апликација -->
67 </select>
68 </div>
69 </div>
70 <div class="form-group">
71 <div class="col-md-offset-2 col-md-10">
72 <input type="submit" value="Save" class="btn btn-dark" />
73 </div>
74 </div>
75</div>
76}
77
78<div>
79 @Html.ActionLink("Back to List", "Index")
80</div>
Note: See TracBrowser for help on using the repository browser.