Edit.cshtml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @using CD67.FicheCollege.MVC.Models
  2. @model RestaurationTypeViewModel
  3. @{
  4. ViewBag.Title = "Modification";
  5. Layout = "~/Views/Shared/_AdminLayout.cshtml";
  6. RestaurationType type = Model.Obj;
  7. }
  8. <h2>Modification</h2>
  9. @using (Html.BeginForm())
  10. {
  11. @Html.AntiForgeryToken()
  12. <div class="form-horizontal">
  13. <h4>Type de restauration</h4>
  14. <hr />
  15. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  16. @Html.HiddenFor(model => type.Id)
  17. @Html.HiddenFor(model => type.Ordre)
  18. <div class="form-group">
  19. @Html.LabelFor(model => type.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
  20. <div class="col-md-10">
  21. @Html.EditorFor(model => type.Libelle, new { htmlAttributes = new { @class = "form-control" } })
  22. @Html.ValidationMessageFor(model => type.Libelle, "", new { @class = "text-danger" })
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. @Html.LabelFor(model => type.Valid, htmlAttributes: new { @class = "control-label col-md-2" })
  27. <div class="col-md-10">
  28. @Html.EditorFor(model => type.Valid, new { htmlAttributes = new { @class = "form-control" } })
  29. @Html.ValidationMessageFor(model => type.Valid, "", new { @class = "text-danger" })
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <div class="col-md-offset-2 col-md-10">
  34. <input type="submit" value="Enregistrer" class="btn btn-default" />
  35. </div>
  36. </div>
  37. </div>
  38. }
  39. <div>
  40. @Html.ActionLink("Retour à la liste", "Index")
  41. </div>
  42. @section Scripts {
  43. }