Edit.cshtml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionClasViewModel
  3. @{
  4. ViewBag.Title = "Edit";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionCLAS actionClas = Model.Obj;
  7. }
  8. <h1>@actionClas.College.Libelle</h1>
  9. @using (Html.BeginForm())
  10. {
  11. @Html.AntiForgeryToken()
  12. <fieldset>
  13. <legend>
  14. Actions CLAS - @Model.Acces.ToString()
  15. </legend>
  16. <div class="form-horizontal">
  17. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  18. @Html.HiddenFor(model => actionClas.College_Id)
  19. <div class="form-group">
  20. @Html.LabelFor(model => actionClas.Action, htmlAttributes: new { @class = "control-label col-md-2" })
  21. <div class="col-md-10">
  22. <div class="checkbox">
  23. @Html.EditorFor(model => actionClas.Action)
  24. @Html.ValidationMessageFor(model => actionClas.Action, "", new { @class = "text-danger" })
  25. </div>
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. @Html.LabelFor(model => actionClas.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
  30. <div class="col-md-10">
  31. @Html.EditorFor(model => actionClas.Commentaire, new { htmlAttributes = new { @class = "form-control", @rows = 10 } })
  32. @Html.ValidationMessageFor(model => actionClas.Commentaire, "", new { @class = "text-danger" })
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <div class="col-md-offset-2 col-md-10">
  37. <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-default" /> |
  38. @Html.ActionLink("Annuler", "Details", new { Id = actionClas.College_Id })
  39. </div>
  40. </div>
  41. </div>
  42. </fieldset>
  43. }
  44. @section Scripts {
  45. @Scripts.Render("~/bundles/jqueryval")
  46. }