Edit.cshtml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduViewModel
  3. @{
  4. ViewBag.Title = "Modification";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEdu actionEdu = Model.Obj;
  7. }
  8. <header>
  9. <h2>Edition de l'Action Educative '@actionEdu.Nom'</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 => actionEdu.Id)
  17. @Html.HiddenFor(model => actionEdu.Ordre)
  18. @Html.HiddenFor(model => actionEdu.AnneeId)
  19. @Html.HiddenFor(model => actionEdu.TokenId)
  20. <div class="form-group">
  21. @Html.LabelFor(model => actionEdu.ActionEduThematiqueId, htmlAttributes: new { @class = "control-label col-md-2" })
  22. <div class="col-md-10">
  23. @Html.DropDownListFor(model => actionEdu.ActionEduThematiqueId, Model.Sel_Thematique, htmlAttributes: new { @class = "form-control" })
  24. @Html.ValidationMessageFor(model => actionEdu.ActionEduThematiqueId, "", new { @class = "text-danger" })
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. @Html.LabelFor(model => actionEdu.Numero, htmlAttributes: new { @class = "control-label col-md-2" })
  29. <div class="col-md-10">
  30. @Html.EditorFor(model => actionEdu.Numero, new { htmlAttributes = new { @class = "form-control" } })
  31. @Html.ValidationMessageFor(model => actionEdu.Numero, "", new { @class = "text-danger" })
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. @Html.LabelFor(model => actionEdu.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
  36. <div class="col-md-10">
  37. @Html.EditorFor(model => actionEdu.Nom, new { htmlAttributes = new { @class = "form-control" } })
  38. @Html.ValidationMessageFor(model => actionEdu.Nom, "", new { @class = "text-danger" })
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. @Html.LabelFor(model => actionEdu.Montant, htmlAttributes: new { @class = "control-label col-md-2" })
  43. <div class="col-md-10">
  44. @Html.EditorFor(model => actionEdu.Montant, new { htmlAttributes = new { @class = "form-control" } })
  45. @Html.ValidationMessageFor(model => actionEdu.Montant, "", new { @class = "text-danger" })
  46. </div>
  47. </div>
  48. <div class="form-group">
  49. @Html.LabelFor(model => actionEdu.StatutId, htmlAttributes: new { @class = "control-label col-md-2" })
  50. <div class="col-md-10">
  51. @Html.DropDownListFor(model => actionEdu.StatutId, Model.Sel_Statut, htmlAttributes: new { @class = "form-control" })
  52. @Html.ValidationMessageFor(model => actionEdu.StatutId, "", new { @class = "text-danger" })
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. @Html.LabelFor(model => actionEdu.Description, htmlAttributes: new { @class = "control-label col-md-2" })
  57. <div class="col-md-10">
  58. @Html.EditorFor(model => actionEdu.Description, new { htmlAttributes = new { @class = "form-control" } })
  59. @Html.ValidationMessageFor(model => actionEdu.Description, "", new { @class = "text-danger" })
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. @Html.LabelFor(model => actionEdu.CommentairePublic, htmlAttributes: new { @class = "control-label col-md-2" })
  64. <div class="col-md-10">
  65. @Html.EditorFor(model => actionEdu.CommentairePublic, new { htmlAttributes = new { @class = "form-control" } })
  66. @Html.ValidationMessageFor(model => actionEdu.CommentairePublic, "", new { @class = "text-danger" })
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. @Html.LabelFor(model => actionEdu.CommentaireInterne, htmlAttributes: new { @class = "control-label col-md-2" })
  71. <div class="col-md-10">
  72. @Html.EditorFor(model => actionEdu.CommentaireInterne, new { htmlAttributes = new { @class = "form-control" } })
  73. @Html.ValidationMessageFor(model => actionEdu.CommentaireInterne, "", new { @class = "text-danger" })
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. @Html.LabelFor(model => actionEdu.Neutralise, htmlAttributes: new { @class = "control-label col-md-2" })
  78. <div class="col-md-10">
  79. @Html.EditorFor(model => actionEdu.Neutralise, new { htmlAttributes = new { @class = "form-control" } })
  80. @Html.ValidationMessageFor(model => actionEdu.Neutralise, "", new { @class = "text-danger" })
  81. </div>
  82. </div>
  83. <div class="form-group">
  84. <div class="col-md-offset-2 col-md-10">
  85. <input type="submit" value="Enregistrer" class="btn btn-default" />
  86. </div>
  87. </div>
  88. </div>
  89. }
  90. <div>
  91. @Html.ActionLink("Annuler", "Details", new { id = actionEdu.Id })
  92. </div>
  93. @section Scripts {
  94. <script type="text/javascript">
  95. $(".removeItem").click(function () {
  96. switch ($(this).data("type")) {
  97. case 'tiers':
  98. $('#actionEdu_TiersSid').val(null);
  99. $("span[data-picker='tiers.id']").html('');
  100. $("span[data-picker='tiers.nom']").html('');
  101. default:
  102. return false;
  103. }
  104. });
  105. </script>
  106. @Scripts.Render("~/bundles/jqueryval")
  107. }