Create.cshtml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
  34. <div class="col-md-10">
  35. @Html.EditorFor(model => actionEduCollege.Commentaire, new { htmlAttributes = new { @class = "form-control" } })
  36. @Html.ValidationMessageFor(model => actionEduCollege.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. }