@using CD67.FicheCollege.MVC.Models @model CollegeViewModel @{ ViewBag.Title = Model.Acces.ToString(); Layout = "~/Views/Shared/_Layout.cshtml"; College contenu = Model.Contenu as College; }

@Model.College_Libelle

@using (Html.BeginForm()) { @Html.AntiForgeryToken()
Informations générales - @Model.Acces.ToString()

Collège


@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @if (Model.Acces == ModeAcces.Modification) { @Html.HiddenFor(model => contenu.Id) }
@Html.LabelFor(model => contenu.Id, htmlAttributes: new { @class = "control-label col-md-2" })
@if (Model.Acces == ModeAcces.Modification) { @Html.EditorFor(model => contenu.Id, new { htmlAttributes = new { @class = "form-control", @disabled = true } }) } else { @Html.EditorFor(model => contenu.Id, new { htmlAttributes = new { @class = "form-control" } }) } @Html.ValidationMessageFor(model => contenu.Id, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => contenu.Libelle, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => contenu.Libelle, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.TypeCollege_Id, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.DropDownListFor(model => contenu.TypeCollege_Id, Model.Listes["TypeCollege_Id"], htmlAttributes: new { @class = "form-control" }) @Html.ValidationMessageFor(model => contenu.TypeCollege_Id, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.Adresse, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => contenu.Adresse, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => contenu.Adresse, "", new { @class = "text-danger" })
@Html.HiddenFor(model => contenu.Commune_Insee, new { data_picker = "commune.insee" }) @Html.HiddenFor(model => contenu.Commune, new { data_picker = "commune.nom" }) @Html.HiddenFor(model => contenu.Canton, new { data_picker = "commune.canton" }) @Html.HiddenFor(model => contenu.Territoire_Id, new { data_picker = "commune.code_tad" }) @Html.HiddenFor(model => contenu.TAD, new { data_picker = "commune.tad" }) @Html.HiddenFor(model => contenu.CDC, new { data_picker = "commune.cdc" })
@Html.LabelFor(model => contenu.Commune, htmlAttributes: new { @class = "control-label col-md-2 required" })
Sélectionner une commune

Localisation (commune)

@contenu.Commune
Canton : @contenu.Canton
TAD : @contenu.TAD
CDC : @contenu.CDC
@Html.ValidationMessageFor(model => contenu.Commune, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.Code_Postal, htmlAttributes: new { @class = "control-label col-md-2" })
Code(s) postal(aux) associé(s) à la commune display: none; }">(attention, plusieurs choix possibles) : i.Text))" class="disabled-input-as-label" />
@Html.DropDownListFor(model => contenu.Code_Postal, Model.Listes["Code_Postal"], htmlAttributes: new { @class = "form-control" }) @Html.ValidationMessageFor(model => contenu.Code_Postal, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => contenu.Tel, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => contenu.Tel, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.Fax, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => contenu.Fax, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => contenu.Fax, "", new { @class = "text-danger" })
@Html.LabelFor(model => contenu.Email, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => contenu.Email, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => contenu.Email, "", new { @class = "text-danger" })
| @if (Model.Acces == ModeAcces.Creation) { @Html.ActionLink("Annuler", "Index") } else { @Html.ActionLink("Annuler", "Details", new { Id = Model.College_Id }) }
} @section Scripts { @Scripts.Render("~/bundles/jqueryval") }