Create.cshtml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduCollegeViewModel
  3. @{
  4. ViewBag.Title = "Création";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEduCollege actionEduCollege = Model.Obj;
  7. }
  8. <header>
  9. <h2>Action '@actionEduCollege.ActionEdu.Nom': Affecter à un collège</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 => actionEduCollege.Id)
  17. @Html.HiddenFor(model => actionEduCollege.ActionEduId)
  18. <div class="form-group">
  19. @Html.LabelFor(model => actionEduCollege.CollegeId, htmlAttributes: new { @class = "control-label col-md-2" })
  20. <div class="col-md-10">
  21. @Html.DropDownListFor(model => actionEduCollege.CollegeId, Model.Sel_College, htmlAttributes: new { @class = "form-control" })
  22. @Html.ValidationMessageFor(model => actionEduCollege.CollegeId, "", new { @class = "text-danger" })
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. @Html.LabelFor(model => actionEduCollege.NbEleves, htmlAttributes: new { @class = "control-label col-md-2" })
  27. <div class="col-md-10">
  28. @Html.EditorFor(model => actionEduCollege.NbEleves, new { htmlAttributes = new { @class = "form-control" } })
  29. @Html.ValidationMessageFor(model => actionEduCollege.NbEleves, "", new { @class = "text-danger" })
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. @Html.LabelFor(model => actionEduCollege.CommentaireInterne, htmlAttributes: new { @class = "control-label col-md-2" })
  34. <div class="col-md-10">
  35. @Html.EditorFor(model => actionEduCollege.CommentaireInterne, new { htmlAttributes = new { @class = "form-control" } })
  36. @Html.ValidationMessageFor(model => actionEduCollege.CommentaireInterne, "", new { @class = "text-danger" })
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. @Html.LabelFor(model => actionEduCollege.CommentairePublic, htmlAttributes: new { @class = "control-label col-md-2" })
  41. <div class="col-md-10">
  42. @Html.EditorFor(model => actionEduCollege.CommentairePublic, new { htmlAttributes = new { @class = "form-control" } })
  43. @Html.ValidationMessageFor(model => actionEduCollege.CommentairePublic, "", new { @class = "text-danger" })
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <div class="col-md-offset-2 col-md-10">
  48. <input type="submit" value="Créer" class="btn btn-default" />
  49. </div>
  50. </div>
  51. </div>
  52. }