Create.cshtml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduThematiqueViewModel
  3. @{
  4. ViewBag.Title = "Création";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEduThematique thematique = Model.Obj;
  7. }
  8. @using (Html.BeginForm())
  9. {
  10. @Html.AntiForgeryToken()
  11. <div class="form-horizontal">
  12. <h4>Thématique</h4>
  13. <hr />
  14. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  15. @Html.HiddenFor(model => thematique.Id)
  16. @Html.HiddenFor(model => thematique.Ordre)
  17. <div class="form-group">
  18. @Html.LabelFor(model => thematique.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
  19. <div class="col-md-10">
  20. @Html.EditorFor(model => thematique.Nom, new { htmlAttributes = new { @class = "form-control" } })
  21. @Html.ValidationMessageFor(model => thematique.Nom, "", new { @class = "text-danger" })
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <div class="col-md-offset-2 col-md-10">
  26. <input type="submit" value="Créer" class="btn btn-default" />
  27. </div>
  28. </div>
  29. </div>
  30. }
  31. <div>
  32. @Html.ActionLink("Retour à la liste", "Index")
  33. </div>
  34. @section Scripts {
  35. }