Create.cshtml 5.1 KB

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