| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- @model CD67.ModeleMVC.Entity.Viking
- @{
- ViewBag.Title = "Edit";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- <title>Vikings</title>
- <h2>Edition</h2>
- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
- <div class="form-horizontal">
- <h4>Viking</h4>
- <hr />
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- @Html.HiddenFor(model => model.Id)
- @Html.HiddenFor(model => model.DateCreation)
- <div class="form-group">
- @Html.LabelFor(model => model.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Nom, new { htmlAttributes = new { @class = "form-control autofocus" } })
- @Html.ValidationMessageFor(model => model.Nom, "", new { @class = "text-danger" })
- </div>
- </div>
- @*Liste de choix pour le type, rempli gràce au ViewBag dans le contrôleur*@
- <div class="form-group">
- @Html.LabelFor(model => model.TypeViking, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.DropDownListFor(model => model.TypeVikingId, (IEnumerable<SelectListItem>)ViewBag.ListeTypesViking, htmlAttributes: new { @class = "form-control custom-dropdown col-md-12" })
- @Html.ValidationMessageFor(model => model.TypeViking, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.costaud, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.costaud, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.costaud, "", new { @class = "text-danger" })
- @Html.DescriptionFor(model => model.costaud)
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.NombreVictoires, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.NombreVictoires, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.NombreVictoires, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.CasqueCornu, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.CasqueCornu, new { htmlAttributes = new { @class = "form-control" } })
- </div>
- </div>
- <div class="col-md-7">
- </div>
- <div class="form-group col-md-5">
- <div class="col-md-offset-2 col-md-10">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" value="Enregistrer" class="btn btn-info" />
- <input onclick="location.href='@Url.Action("Index", "Viking")';return false;" value="Retour" class="btn btn-default" />
- </div>
- </div>
- </div>
- </div>
- }
|