|
2 | 2 |
|
3 | 3 | @{ |
4 | 4 | ViewBag.Title = "Create"; |
5 | | - Layout = "~/Views/Shared/_Layout.cshtml"; |
6 | 5 | } |
7 | 6 |
|
8 | | -<h2>Create</h2> |
| 7 | +<h2>Create new book</h2> |
9 | 8 |
|
10 | | - |
11 | | -@using (Html.BeginForm()) |
| 9 | +@using (Html.BeginForm()) |
12 | 10 | { |
13 | 11 | @Html.AntiForgeryToken() |
14 | | - |
| 12 | + |
15 | 13 | <div class="form-horizontal"> |
16 | 14 | <h4>Book</h4> |
17 | 15 | <hr /> |
|
33 | 31 | </div> |
34 | 32 |
|
35 | 33 | <div class="form-group"> |
36 | | - <label class="control-label col-md-2" for="AuthorID">Author</label> |
37 | | - <div class="col-md-10"> |
38 | | - @Html.DropDownList("AuthorID", null, htmlAttributes: new { @class = "form-control" }) |
39 | | - @Html.ValidationMessageFor(model => model.AuthorID, "", new { @class = "text-danger" }) |
40 | | - </div> |
41 | | - </div> |
42 | | - |
43 | | - <div class="form-group"> |
44 | | - <label class="control-label col-md-2" for="CategoryID">Category</label> |
| 34 | + @Html.LabelFor(model => model.CreationDate, htmlAttributes: new { @class = "control-label col-md-2" }) |
45 | 35 | <div class="col-md-10"> |
46 | | - @Html.DropDownList("CategoryID", null, htmlAttributes: new { @class = "form-control" }) |
47 | | - @Html.ValidationMessageFor(model => model.CategoryID, "", new { @class = "text-danger" }) |
| 36 | + @Html.EditorFor(model => model.CreationDate, new { htmlAttributes = new { @class = "form-control" } }) |
| 37 | + @Html.ValidationMessageFor(model => model.CreationDate, "", new { @class = "text-danger" }) |
48 | 38 | </div> |
49 | 39 | </div> |
50 | 40 |
|
|
80 | 70 | </div> |
81 | 71 | </div> |
82 | 72 |
|
| 73 | + <div class="form-group"> |
| 74 | + @Html.LabelFor(model => model.Condition, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 75 | + <div class="col-md-10"> |
| 76 | + @Html.EnumDropDownListFor(model => model.Condition, htmlAttributes: new { @class = "form-control" }) |
| 77 | + @Html.ValidationMessageFor(model => model.Condition, "", new { @class = "text-danger" }) |
| 78 | + </div> |
| 79 | + </div> |
| 80 | + |
| 81 | + <div class="form-group"> |
| 82 | + @Html.LabelFor(model => model.Location, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 83 | + <div class="col-md-10"> |
| 84 | + @Html.EditorFor(model => model.Location, new { htmlAttributes = new { @class = "form-control" } }) |
| 85 | + @Html.ValidationMessageFor(model => model.Location, "", new { @class = "text-danger" }) |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + |
| 89 | + <div class="form-group"> |
| 90 | + @Html.LabelFor(model => model.Rating, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 91 | + <div class="col-md-10"> |
| 92 | + @Html.EditorFor(model => model.Rating, new { htmlAttributes = new { @class = "form-control" } }) |
| 93 | + @Html.ValidationMessageFor(model => model.Rating, "", new { @class = "text-danger" }) |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + |
| 97 | + <div class="form-group"> |
| 98 | + @Html.LabelFor(model => model.Serie, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 99 | + <div class="col-md-10"> |
| 100 | + @Html.EditorFor(model => model.Serie, new { htmlAttributes = new { @class = "form-control" } }) |
| 101 | + @Html.ValidationMessageFor(model => model.Serie, "", new { @class = "text-danger" }) |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + |
| 105 | + <div class="form-group"> |
| 106 | + @Html.LabelFor(model => model.CodeWithinSerie, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 107 | + <div class="col-md-10"> |
| 108 | + @Html.EditorFor(model => model.CodeWithinSerie, new { htmlAttributes = new { @class = "form-control" } }) |
| 109 | + @Html.ValidationMessageFor(model => model.CodeWithinSerie, "", new { @class = "text-danger" }) |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + |
| 113 | + <div class="form-group"> |
| 114 | + @Html.LabelFor(model => model.Code, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 115 | + <div class="col-md-10"> |
| 116 | + @Html.EditorFor(model => model.Code, new { htmlAttributes = new { @class = "form-control" } }) |
| 117 | + @Html.ValidationMessageFor(model => model.Code, "", new { @class = "text-danger" }) |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + |
| 121 | + <div class="form-group"> |
| 122 | + @Html.LabelFor(model => model.SortField, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 123 | + <div class="col-md-10"> |
| 124 | + @Html.EditorFor(model => model.SortField, new { htmlAttributes = new { @class = "form-control" } }) |
| 125 | + @Html.ValidationMessageFor(model => model.SortField, "", new { @class = "text-danger" }) |
| 126 | + </div> |
| 127 | + </div> |
| 128 | + |
83 | 129 | <div class="form-group"> |
84 | 130 | @Html.LabelFor(model => model.Read, htmlAttributes: new { @class = "control-label col-md-2" }) |
85 | 131 | <div class="col-md-10"> |
|
122 | 168 | </div> |
123 | 169 | </div> |
124 | 170 |
|
| 171 | + <div class="form-group"> |
| 172 | + @Html.LabelFor(model => model.ReviewNote, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 173 | + <div class="col-md-10"> |
| 174 | + @Html.EditorFor(model => model.ReviewNote, new { htmlAttributes = new { @class = "form-control" } }) |
| 175 | + @Html.ValidationMessageFor(model => model.ReviewNote, "", new { @class = "text-danger" }) |
| 176 | + </div> |
| 177 | + </div> |
| 178 | + |
| 179 | + <div class="form-group"> |
| 180 | + @Html.LabelFor(model => model.AuthorID, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 181 | + <div class="col-md-10"> |
| 182 | + @Html.EditorFor(model => model.AuthorID, new { htmlAttributes = new { @class = "form-control" } }) |
| 183 | + @Html.ValidationMessageFor(model => model.AuthorID, "", new { @class = "text-danger" }) |
| 184 | + </div> |
| 185 | + </div> |
| 186 | + |
| 187 | + <div class="form-group"> |
| 188 | + @Html.LabelFor(model => model.CategoryID, "CategoryID", htmlAttributes: new { @class = "control-label col-md-2" }) |
| 189 | + <div class="col-md-10"> |
| 190 | + @Html.DropDownList("CategoryID", null, htmlAttributes: new { @class = "form-control" }) |
| 191 | + @Html.ValidationMessageFor(model => model.CategoryID, "", new { @class = "text-danger" }) |
| 192 | + </div> |
| 193 | + </div> |
| 194 | + |
| 195 | + <div class="form-group"> |
| 196 | + @Html.LabelFor(model => model.PublisherID, "PublisherID", htmlAttributes: new { @class = "control-label col-md-2" }) |
| 197 | + <div class="col-md-10"> |
| 198 | + @Html.DropDownList("PublisherID", null, htmlAttributes: new { @class = "form-control" }) |
| 199 | + @Html.ValidationMessageFor(model => model.PublisherID, "", new { @class = "text-danger" }) |
| 200 | + </div> |
| 201 | + </div> |
| 202 | + |
| 203 | + <div class="form-group"> |
| 204 | + @Html.LabelFor(model => model.MainSubjectID, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 205 | + <div class="col-md-10"> |
| 206 | + @Html.EditorFor(model => model.MainSubjectID, new { htmlAttributes = new { @class = "form-control" } }) |
| 207 | + @Html.ValidationMessageFor(model => model.MainSubjectID, "", new { @class = "text-danger" }) |
| 208 | + </div> |
| 209 | + </div> |
| 210 | + |
125 | 211 | <div class="form-group"> |
126 | 212 | <div class="col-md-offset-2 col-md-10"> |
127 | 213 | <input type="submit" value="Create" class="btn btn-default" /> |
|
133 | 219 | <div> |
134 | 220 | @Html.ActionLink("Back to List", "Index") |
135 | 221 | </div> |
136 | | - |
137 | | -@section Scripts { |
138 | | - @Scripts.Render("~/bundles/jqueryval") |
139 | | -} |
|
0 commit comments