Custom logging
[wsti_pai.git] / Projects / Views / Projects / Edit.cshtml
1 @model Projects.Models.Project
2
3 @{
4     ViewBag.Title = "Edycja projektu";
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         @Html.HiddenFor(model => model.id)
19         <div class="form-group">
20             <label class="control-label col-sm-2" for="createdAt">Wpis utworzony:</label>
21             <div class="col-sm-10">
22                 <p class="form-control-static">@Html.DisplayFor(model => model.created_at)</p>
23                 @Html.EditorFor(model => model.created_at, new { htmlAttributes = new { @class = "form-control", @type = "hidden" } })
24             </div>
25         </div>
26         <div class="form-group">
27             <label class="control-label col-sm-2" for="updatedAt">Ostatnio modyfikowany:</label>
28             <div class="col-sm-10">
29                 <input type="text" class="form-control" id="updatedAt" placeholder="@Html.DisplayFor(model => model.updated_at)" readonly>
30             </div>
31         </div>
32
33         <div class="form-group">
34             @Html.LabelFor(model => model.user_id, "user_id", htmlAttributes: new { @class = "control-label col-md-2" })
35             <div class="col-md-10">
36                 @Html.DropDownList("user_id", null, htmlAttributes: new { @class = "form-control" })
37                 @Html.ValidationMessageFor(model => model.user_id, "", new { @class = "text-danger" })
38             </div>
39         </div>
40
41         <div class="form-group">
42             @Html.LabelFor(model => model.name, htmlAttributes: new { @class = "control-label col-md-2" })
43             <div class="col-md-10">
44                 @Html.EditorFor(model => model.name, new { htmlAttributes = new { @class = "form-control" } })
45                 @Html.ValidationMessageFor(model => model.name, "", new { @class = "text-danger" })
46             </div>
47         </div>
48
49         <div class="form-group">
50             @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
51             <div class="col-md-10">
52                 @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
53                 @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
54             </div>
55         </div>
56
57         <div class="form-group">
58             <div class="col-md-offset-2 col-md-10">
59                 <input type="submit" value="Zapisz" class="btn btn-default" />
60             </div>
61         </div>
62     </div>
63 }
64
65 <div>
66     @Html.ActionLink("Powrót do listy", "Index")
67 </div>
68
69 @section Scripts {
70     @Scripts.Render("~/bundles/jqueryval")
71 }