|
@@ -4,133 +4,137 @@
|
|
|
@{
|
|
@{
|
|
|
ViewBag.Title = "Ajout";
|
|
ViewBag.Title = "Ajout";
|
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
|
- College college = Model.Contenu as College;
|
|
|
|
|
|
|
+ College contenu = Model.Contenu as College;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-<h2>@Model.Acces.ToString()</h2>
|
|
|
|
|
-
|
|
|
|
|
|
|
+<h1>@Model.College_Libelle</h1>
|
|
|
|
|
|
|
|
@using (Html.BeginForm())
|
|
@using (Html.BeginForm())
|
|
|
{
|
|
{
|
|
|
@Html.AntiForgeryToken()
|
|
@Html.AntiForgeryToken()
|
|
|
|
|
|
|
|
- <div class="form-horizontal">
|
|
|
|
|
- <h4>Collège</h4>
|
|
|
|
|
- <hr />
|
|
|
|
|
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
|
|
|
|
-
|
|
|
|
|
- @if (Model.Acces == ModeAcces.Modification)
|
|
|
|
|
- {
|
|
|
|
|
- @Html.HiddenFor(model => college.Id)
|
|
|
|
|
- }
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @if (Model.Acces == ModeAcces.Modification)
|
|
|
|
|
- {
|
|
|
|
|
- @Html.EditorFor(model => college.Id, new { htmlAttributes = new { @class = "form-control", @disabled = true } })
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- @Html.EditorFor(model => college.Id, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
- }
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.Id, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <fieldset>
|
|
|
|
|
+ <legend>
|
|
|
|
|
+ Informations générales - @Model.Acces.ToString()
|
|
|
|
|
+ </legend>
|
|
|
|
|
+ <div class="form-horizontal">
|
|
|
|
|
+ <h4>Collège</h4>
|
|
|
|
|
+ <hr />
|
|
|
|
|
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
|
|
|
|
+
|
|
|
|
|
+ @if (Model.Acces == ModeAcces.Modification)
|
|
|
|
|
+ {
|
|
|
|
|
+ @Html.HiddenFor(model => contenu.Id)
|
|
|
|
|
+ }
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @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" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @Html.EditorFor(model => college.Libelle, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.Libelle, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @Html.EditorFor(model => contenu.Libelle, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => contenu.Libelle, "", new { @class = "text-danger" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.TypeCollege_Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @Html.DropDownListFor(model => college.TypeCollege_Id, Model.Listes["TypeCollege_Id"], htmlAttributes: new { @class = "form-control" })
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.TypeCollege_Id, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.TypeCollege_Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @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" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Adresse, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @Html.EditorFor(model => college.Adresse, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.Adresse, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Adresse, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @Html.EditorFor(model => contenu.Adresse, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => contenu.Adresse, "", new { @class = "text-danger" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- @Html.HiddenFor(model => college.Code_Postal, new { data_picker = "commune.code_postal" })
|
|
|
|
|
- @Html.HiddenFor(model => college.Commune_Insee, new { data_picker = "commune.insee" })
|
|
|
|
|
- @Html.HiddenFor(model => college.Commune, new { data_picker = "commune.nom" })
|
|
|
|
|
- @Html.HiddenFor(model => college.Canton, new { data_picker = "commune.canton" })
|
|
|
|
|
- @Html.HiddenFor(model => college.Territoire_Id, new { data_picker = "commune.code_tad" })
|
|
|
|
|
- @Html.HiddenFor(model => college.TAD, new { data_picker = "commune.tad" })
|
|
|
|
|
- @Html.HiddenFor(model => college.CDC, new { data_picker = "commune.cdc" })
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Commune, htmlAttributes: new { @class = "control-label col-md-2 required" })
|
|
|
|
|
- <div class="col-md-4">
|
|
|
|
|
- <a class='modal-window' href="http://referentiel.bas-rhin.fr/picker/cd67/com67/" title="Selection commune (nouvelle fenetre)">Sélectionner une commune</a>
|
|
|
|
|
- <br />
|
|
|
|
|
- <div class="panel panel-default" id="Commune_Panel" name="Commune_Panel" style="@if (college.Commune_Insee == null) { <text>display: none;</text> }">
|
|
|
|
|
- <div class="panel-heading clearfix">
|
|
|
|
|
- <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
|
|
|
|
|
- <i class="fa fa-map-marker color1" aria-hidden="true"></i>
|
|
|
|
|
- Localisation (commune)
|
|
|
|
|
- </h4>
|
|
|
|
|
- <div class="pull-right">
|
|
|
|
|
- <span class="glyphicon glyphicon-trash removeItem btn btn-danger btn-sm" aria-hidden="true" data-type="commune"></span>
|
|
|
|
|
|
|
+ @Html.HiddenFor(model => contenu.Code_Postal, new { data_picker = "commune.code_postal" })
|
|
|
|
|
+ @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" })
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Commune, htmlAttributes: new { @class = "control-label col-md-2 required" })
|
|
|
|
|
+ <div class="col-md-4">
|
|
|
|
|
+ <a class='modal-window' href="http://referentiel.bas-rhin.fr/picker/cd67/com67/" title="Selection commune (nouvelle fenetre)">Sélectionner une commune</a>
|
|
|
|
|
+ <br />
|
|
|
|
|
+ <div class="panel panel-default" id="Commune_Panel" name="Commune_Panel" style="@if (contenu.Commune_Insee == null) { <text>display: none;</text> }">
|
|
|
|
|
+ <div class="panel-heading clearfix">
|
|
|
|
|
+ <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
|
|
|
|
|
+ <i class="fa fa-map-marker color1" aria-hidden="true"></i>
|
|
|
|
|
+ Localisation (commune)
|
|
|
|
|
+ </h4>
|
|
|
|
|
+ <div class="pull-right">
|
|
|
|
|
+ <span class="glyphicon glyphicon-trash removeItem btn btn-danger btn-sm" aria-hidden="true" data-type="commune"></span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="panel-body" style="text-align: center;">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ <b><span data-picker="commune.nom">@contenu.Commune</span ></b >
|
|
|
|
|
+ <br />Canton : <span data-picker="commune.canton">@contenu.Canton</span >
|
|
|
|
|
+ <br />TAD : <span data-picker="commune.tad">@contenu.TAD</span >
|
|
|
|
|
+ <br />CDC : <span data-picker="commune.cdc">@contenu.CDC</span >
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="panel-body" style="text-align: center;">
|
|
|
|
|
- <span>
|
|
|
|
|
- <b><span data-picker="commune.nom">@college.Commune</span ></b >
|
|
|
|
|
- <br />Canton : <span data-picker="commune.canton">@college.Canton</span >
|
|
|
|
|
- <br />TAD : <span data-picker="commune.tad">@college.TAD</span >
|
|
|
|
|
- <br />CDC : <span data-picker="commune.cdc">@college.CDC</span >
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ @Html.ValidationMessageFor(model => contenu.Commune, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
- @Html.ValidationMessageFor(model => college.Commune, "", new { @class = "text-danger" })
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @Html.EditorFor(model => college.Tel, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.Tel, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @Html.EditorFor(model => contenu.Tel, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => contenu.Tel, "", new { @class = "text-danger" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Fax, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @Html.EditorFor(model => college.Fax, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.Fax, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Fax, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @Html.EditorFor(model => contenu.Fax, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => contenu.Fax, "", new { @class = "text-danger" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- @Html.LabelFor(model => college.Email, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
- <div class="col-md-10">
|
|
|
|
|
- @Html.EditorFor(model => college.Email, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
- @Html.ValidationMessageFor(model => college.Email, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ @Html.LabelFor(model => contenu.Email, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
+ <div class="col-md-10">
|
|
|
|
|
+ @Html.EditorFor(model => contenu.Email, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => contenu.Email, "", new { @class = "text-danger" })
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <div class="col-md-offset-2 col-md-10">
|
|
|
|
|
- <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-default" /> |
|
|
|
|
|
- @if (Model.Acces == ModeAcces.Creation)
|
|
|
|
|
- { @Html.ActionLink("Annuler", "Index") }
|
|
|
|
|
- else
|
|
|
|
|
- { @Html.ActionLink("Annuler", "Details", new { Id = Model.College_Id }) }
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <div class="col-md-offset-2 col-md-10">
|
|
|
|
|
+ <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-default" /> |
|
|
|
|
|
+ @if (Model.Acces == ModeAcces.Creation)
|
|
|
|
|
+ { @Html.ActionLink("Annuler", "Index") }
|
|
|
|
|
+ else
|
|
|
|
|
+ { @Html.ActionLink("Annuler", "Details", new { Id = Model.College_Id }) }
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </fieldset>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@section Scripts {
|
|
@section Scripts {
|