db06601cf6fef14bbd9a111c8e1d8b0f664036d0
[wsti_pai.git] / Projects / Views / Projects / Create.cshtml
1 @model Projects.Models.Project
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>Project</h4>
16         <hr />
17         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
18         <div class="form-group">
19             @Html.LabelFor(model => model.user_id, "user_id", htmlAttributes: new { @class = "control-label col-md-2" })
20             <div class="col-md-10">
21                 @Html.DropDownList("user_id", null, htmlAttributes: new { @class = "form-control" })
22                 @Html.ValidationMessageFor(model => model.user_id, "", new { @class = "text-danger" })
23             </div>
24         </div>
25
26         <div class="form-group">
27             @Html.LabelFor(model => model.name, htmlAttributes: new { @class = "control-label col-md-2" })
28             <div class="col-md-10">
29                 @Html.EditorFor(model => model.name, new { htmlAttributes = new { @class = "form-control" } })
30                 @Html.ValidationMessageFor(model => model.name, "", new { @class = "text-danger" })
31             </div>
32         </div>
33
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.created_at, htmlAttributes: new { @class = "control-label col-md-2" })
44             <div class="col-md-10">
45                 @Html.EditorFor(model => model.created_at, new { htmlAttributes = new { @class = "form-control" } })
46                 @Html.ValidationMessageFor(model => model.created_at, "", new { @class = "text-danger" })
47             </div>
48         </div>
49
50         <div class="form-group">
51             @Html.LabelFor(model => model.updated_at, htmlAttributes: new { @class = "control-label col-md-2" })
52             <div class="col-md-10">
53                 @Html.EditorFor(model => model.updated_at, new { htmlAttributes = new { @class = "form-control" } })
54                 @Html.ValidationMessageFor(model => model.updated_at, "", new { @class = "text-danger" })
55             </div>
56         </div>
57
58         <div class="form-group">
59             <div class="col-md-offset-2 col-md-10">
60                 <input type="submit" value="Create" class="btn btn-default" />
61             </div>
62         </div>
63     </div>
64 }
65
66 <div>
67     @Html.ActionLink("Back to List", "Index")
68 </div>
69
70 @section Scripts {
71     @Scripts.Render("~/bundles/jqueryval")
72 }