source: PostgreSqlDotnetCore/Views/Pets/Edit.cshtml@ 63bd770

main
Last change on this file since 63bd770 was 8f8226c, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago

fix bugs and new pages

Fix BlogPostAnswers
fix present data in the lists

  • Property mode set to 100644
File size: 3.6 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.name, htmlAttributes: new { @class = "control-label col-md-2" })
22 <div class="col-md-10">
23 @Html.EditorFor(model => model.name, new { htmlAttributes = new { @class = "form-control" } })
24 @Html.ValidationMessageFor(model => model.name, "", new { @class = "text-danger" })
25 </div>
26 </div>
27 <div class="form-group">
28 @Html.LabelFor(model => model.color, htmlAttributes: new { @class = "control-label col-md-2" })
29 <div class="col-md-10">
30 @Html.EditorFor(model => model.color, new { htmlAttributes = new { @class = "form-control" } })
31 @Html.ValidationMessageFor(model => model.color, "", new { @class = "text-danger" })
32 </div>
33 </div>
34 <div class="form-group">
35 @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
36 <div class="col-md-10">
37 @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
38 @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
39 </div>
40 </div>
41 @* <div class="form-group">
42 @Html.LabelFor(model => model.dateofbirthday, htmlAttributes: new { @class = "control-label col-md-2" })
43 <div class="col-md-10">
44 @Html.EditorFor(model => model.dateofbirthday, new { htmlAttributes = new { @class = "form-control" } })
45 @Html.ValidationMessageFor(model => model.dateofbirthday, "", new { @class = "text-danger" })
46 </div>
47 </div> *@
48
49 <div class="form-group">
50 <label asp-for="dateofbirthday" class="control-label"></label>
51 <input asp-for="dateofbirthday" class="form-control" type="date" />
52 <span asp-validation-for="dateofbirthday" class="text-danger"></span>
53 </div>
54
55@* <div class="form-group">
56 @Html.LabelFor(model => model.typeofpetsid, htmlAttributes: new { @class = "control-label col-md-2" })
57 <div class="col-md-10">
58 @Html.EditorFor(model => model.typeofpetsid, new { htmlAttributes = new { @class = "form-control" } })
59 @Html.ValidationMessageFor(model => model.typeofpetsid, "", new { @class = "text-danger" })
60 </div>
61 </div> *@
62 <div class="form-group">
63 <label class="control-label col-md-2" for="typeofpetsid">Type:</label>
64 <div class="col-md-10 ">
65
66 <select class="form-control" id="typeofpetsid" name="typeofpetsid">
67 <option value="">Select type</option>
68 <option value="1">Cat</option>
69 <option value="2">Dog</option>
70 @* <option value="3">Dog</option>
71 <option value="4">Cat</option>
72 <option value="5">Dog</option> *@
73 <!-- Додадете ги другите улоги како опции според вашата апликација -->
74 </select>
75 </div>
76 </div>
77 <div class="form-group">
78 <div class="col-md-offset-2 col-md-10">
79 <input type="submit" value="Save" class="btn btn-dark" />
80 </div>
81 </div>
82</div>
83}
84
85<div>
86 @Html.ActionLink("Back to List", "Index")
87</div>
Note: See TracBrowser for help on using the repository browser.