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.color, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
21 | <div class="col-md-10">
|
---|
22 | @Html.EditorFor(model => model.color, new { htmlAttributes = new { @class = "form-control" } })
|
---|
23 | @Html.ValidationMessageFor(model => model.color, "", new { @class = "text-danger" })
|
---|
24 | </div>
|
---|
25 | </div>
|
---|
26 | <div class="form-group">
|
---|
27 | @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
28 | <div class="col-md-10">
|
---|
29 | @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
|
---|
30 | @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
|
---|
31 | </div>
|
---|
32 | </div>
|
---|
33 |
|
---|
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 |
|
---|
56 |
|
---|
57 | <div class="form-group">
|
---|
58 | <label class="control-label col-md-2" for="typeofpetsid">Type:</label>
|
---|
59 | <div class="col-md-10 ">
|
---|
60 |
|
---|
61 | <select class="form-control" id="typeofpetsid" name="typeofpetsid">
|
---|
62 | <option value="">Select type</option>
|
---|
63 | <option value="1">Cat</option>
|
---|
64 | <option value="2">Dog</option>
|
---|
65 | @* <option value="3">Dog</option>
|
---|
66 | <option value="4">Cat</option>
|
---|
67 | <option value="5">Dog</option> *@
|
---|
68 | <!-- Додадете ги другите улоги како опции според вашата апликација -->
|
---|
69 | </select>
|
---|
70 | </div>
|
---|
71 | </div>
|
---|
72 | <div class="form-group">
|
---|
73 | <div class="col-md-offset-2 col-md-10">
|
---|
74 | <input type="submit" value="Create" class="btn btn-dark" />
|
---|
75 | </div>
|
---|
76 | </div>
|
---|
77 | </div>
|
---|
78 | }
|
---|
79 |
|
---|
80 | <div>
|
---|
81 | @Html.ActionLink("Back to List", "Index")
|
---|
82 | </div>
|
---|