source: PostgreSqlDotnetCore/Views/Pets/Create.cshtml@ 8f8226c

main
Last change on this file since 8f8226c was 8f8226c, checked in by ElenaMoskova <elena.moskova99@…>, 6 weeks 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 = "Create";
5}
6
7<h2>Create</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
19 <div class="form-group">
20 @Html.LabelFor(model => model.name, htmlAttributes: new { @class = "control-label col-md-2" })
21 <div class="col-md-10">
22 @Html.EditorFor(model => model.name, new { htmlAttributes = new { @class = "form-control" } })
23 @Html.ValidationMessageFor(model => model.name, "", new { @class = "text-danger" })
24 </div>
25 </div>
26
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
42 @* <div class="form-group">
43 @Html.LabelFor(model => model.dateofbirthday, htmlAttributes: new { @class = "control-label col-md-2" })
44 <div class="col-md-10">
45 @Html.EditorFor(model => model.dateofbirthday, new { htmlAttributes = new { @class = "form-control" } })
46 @Html.ValidationMessageFor(model => model.dateofbirthday, "", new { @class = "text-danger" })
47 </div>
48 </div> *@
49
50 <div class="form-group">
51 <label asp-for="dateofbirthday" class="control-label"></label>
52 <input asp-for="dateofbirthday" class="form-control" type="date" />
53 <span asp-validation-for="dateofbirthday" class="text-danger"></span>
54 </div>
55
56 @* <div class="form-group">
57 @Html.LabelFor(model => model.typeofpetsid, htmlAttributes: new { @class = "control-label col-md-2" })
58 <div class="col-md-10">
59 @Html.EditorFor(model => model.typeofpetsid, new { htmlAttributes = new { @class = "form-control" } })
60 @Html.ValidationMessageFor(model => model.typeofpetsid, "", new { @class = "text-danger" })
61 </div>
62 </div> *@
63
64
65 <div class="form-group">
66 <label class="control-label col-md-2" for="typeofpetsid">Type:</label>
67 <div class="col-md-10 ">
68
69 <select class="form-control" id="typeofpetsid" name="typeofpetsid">
70 <option value="">Select type</option>
71 <option value="1">Cat</option>
72 <option value="2">Dog</option>
73 @* <option value="3">Dog</option>
74 <option value="4">Cat</option>
75 <option value="5">Dog</option> *@
76 <!-- Додадете ги другите улоги како опции според вашата апликација -->
77 </select>
78 </div>
79 </div>
80 <div class="form-group">
81 <div class="col-md-offset-2 col-md-10">
82 <input type="submit" value="Create" class="btn btn-dark" />
83 </div>
84 </div>
85</div>
86}
87
88<div>
89 @Html.ActionLink("Back to List", "Index")
90</div>
Note: See TracBrowser for help on using the repository browser.