Add missing files. Add API for client apps.
[wsti_pai.git] / Projects / Views / Projects / Create.cshtml
1 @model Projects.Models.Project
2
3 @{
4     ViewBag.Title = "Stwórz projekt";
5 }
6
7 <h2>@ViewBag.Title</h2>
8
9
10 @using (Html.BeginForm()) 
11 {
12     @Html.AntiForgeryToken()
13     
14     <div class="form-horizontal">
15         <h4>Projekt</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             <div class="col-md-offset-2 col-md-10">
44                 <input type="submit" value="Stwórz" class="btn btn-default" />
45             </div>
46         </div>
47     </div>
48 }
49
50 <div>
51     @Html.ActionLink("Powrót do listy", "Index")
52 </div>
53
54 @section Scripts {
55     @Scripts.Render("~/bundles/jqueryval")
56 }