Create.cshtml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduActeurViewModel
  3. @{
  4. ViewBag.Title = "Création";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEduActeur actionEduActeur = Model.Obj;
  7. }
  8. <header>
  9. <h2>Action '@actionEduActeur.ActionEdu.Nom': Ajouter un acteur</h2>
  10. </header>
  11. @using (Html.BeginForm())
  12. {
  13. @Html.AntiForgeryToken()
  14. <div class="form-horizontal">
  15. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  16. @Html.HiddenFor(model => actionEduActeur.Id)
  17. @Html.HiddenFor(model => actionEduActeur.ActionEduId)
  18. <div class="form-group">
  19. @Html.LabelFor(model => actionEduActeur.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
  20. <div class="col-md-10">
  21. @Html.EditorFor(model => actionEduActeur.Nom, new { htmlAttributes = new { @class = "form-control" } })
  22. @Html.ValidationMessageFor(model => actionEduActeur.Nom, "", new { @class = "text-danger" })
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. @Html.LabelFor(model => actionEduActeur.RoleId, htmlAttributes: new { @class = "control-label col-md-2" })
  27. <div class="col-md-10">
  28. @Html.DropDownListFor(model => actionEduActeur.RoleId, Model.Sel_Role, htmlAttributes: new { @class = "form-control" })
  29. @Html.ValidationMessageFor(model => actionEduActeur.RoleId, "", new { @class = "text-danger" })
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. @Html.LabelFor(model => actionEduActeur.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
  34. <div class="col-md-10">
  35. @Html.EditorFor(model => actionEduActeur.Commentaire, new { htmlAttributes = new { @class = "form-control" } })
  36. @Html.ValidationMessageFor(model => actionEduActeur.Commentaire, "", new { @class = "text-danger" })
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <div class="col-md-offset-2 col-md-10">
  41. <input type="submit" value="Créer" class="btn btn-default" />
  42. </div>
  43. </div>
  44. </div>
  45. }