Edit.cshtml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduThematiqueViewModel
  3. @{
  4. ViewBag.Title = "Administration - Les Thématiques";
  5. Layout = "~/Views/Shared/_AdminLayout.cshtml";
  6. ActionEduThematique thematique = Model.Obj;
  7. }
  8. @if (Model.Acces == ModeAcces.Modification)
  9. {
  10. <h2>@thematique.Nom</h2>
  11. }
  12. else
  13. {
  14. <h2>Nouvelle Thématique</h2>
  15. }
  16. @using (Html.BeginForm())
  17. {
  18. @Html.AntiForgeryToken()
  19. <div class="form-horizontal">
  20. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  21. @Html.HiddenFor(model => thematique.Id)
  22. @Html.HiddenFor(model => thematique.Ordre)
  23. <div class="form-group">
  24. @Html.LabelFor(model => thematique.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
  25. <div class="col-md-10">
  26. @Html.EditorFor(model => thematique.Nom, new { htmlAttributes = new { @class = "form-control" } })
  27. @Html.ValidationMessageFor(model => thematique.Nom, "", new { @class = "text-danger" })
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. @Html.LabelFor(model => thematique.Neutralise, htmlAttributes: new { @class = "control-label col-md-2" })
  32. <div class="col-md-10">
  33. @Html.EditorFor(model => thematique.Neutralise, new { htmlAttributes = new { @class = "form-control" } })
  34. @Html.ValidationMessageFor(model => thematique.Neutralise, "", new { @class = "text-danger" })
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. @Html.LabelFor(model => thematique.ActionEduAxeId, htmlAttributes: new { @class = "control-label col-md-2" })
  39. <div class="col-md-10">
  40. @Html.DropDownListFor(model => thematique.ActionEduAxeId, Model.Sel_Axes, htmlAttributes: new { @class = "form-control" })
  41. @Html.ValidationMessageFor(model => thematique.ActionEduAxeId, "", new { @class = "text-danger" })
  42. </div>
  43. </div>
  44. <div class="form-group btn-bar">
  45. <a href=@Url.Action("Index") class="btn btn-default">Annuler</a>
  46. <input type="submit" value="Enregistrer" class="btn btn-primary" />
  47. </div>
  48. </div>
  49. }