Edit.cshtml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduActeurViewModel
  3. @{
  4. ViewBag.Title = "Les Actions Educatives " + Model.Annee_Lib;
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEduActeur actionEduActeur = Model.Obj;
  7. }
  8. <header>
  9. @if (Model.Acces == ModeAcces.Modification)
  10. {
  11. <h2>@actionEduActeur.ActionEdu.Nom</h2>
  12. }
  13. else
  14. {
  15. <h2>Nouvel Acteur</h2>
  16. }
  17. </header>
  18. @using (Html.BeginForm())
  19. {
  20. @Html.AntiForgeryToken()
  21. <div class="form-horizontal">
  22. <h4>Actions</h4>
  23. <hr />
  24. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  25. @Html.HiddenFor(model => actionEduActeur.Id)
  26. @Html.HiddenFor(model => actionEduActeur.ActionEduId)
  27. <div class="form-group">
  28. @Html.LabelFor(model => actionEduActeur.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
  29. <div class="col-md-10">
  30. @Html.EditorFor(model => actionEduActeur.Nom, new { htmlAttributes = new { @class = "form-control" } })
  31. @Html.ValidationMessageFor(model => actionEduActeur.Nom, "", new { @class = "text-danger" })
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. @Html.LabelFor(model => actionEduActeur.RoleId, htmlAttributes: new { @class = "control-label col-md-2" })
  36. <div class="col-md-10">
  37. @Html.DropDownListFor(model => actionEduActeur.RoleId, Model.Sel_Role, htmlAttributes: new { @class = "form-control" })
  38. @Html.ValidationMessageFor(model => actionEduActeur.RoleId, "", new { @class = "text-danger" })
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. @Html.LabelFor(model => actionEduActeur.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
  43. <div class="col-md-10">
  44. @Html.EditorFor(model => actionEduActeur.Commentaire, new { htmlAttributes = new { @class = "form-control" } })
  45. @Html.ValidationMessageFor(model => actionEduActeur.Commentaire, "", new { @class = "text-danger" })
  46. </div>
  47. </div>
  48. <div class="form-group btn-bar">
  49. <a href=@Url.Action("Details", "ActionsEdu", new { id = actionEduActeur.ActionEduId }) class="btn btn-default">Annuler</a>
  50. <input type="submit" value="Enregistrer" class="btn btn-primary" />
  51. </div>
  52. </div>
  53. }