|
@@ -1,13 +1,13 @@
|
|
|
@using CD67.FicheCollege.MVC.Models
|
|
@using CD67.FicheCollege.MVC.Models
|
|
|
-@model CollegeViewModel
|
|
|
|
|
|
|
+@model TopModel
|
|
|
|
|
|
|
|
@{
|
|
@{
|
|
|
ViewBag.Title = "Ajout";
|
|
ViewBag.Title = "Ajout";
|
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
|
- College contenu = Model.Contenu as College;
|
|
|
|
|
|
|
+ College college = (Model.Obj as College);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-<h1>@Model.College_Libelle</h1>
|
|
|
|
|
|
|
+<h1>@college.Libelle</h1>
|
|
|
|
|
|
|
|
@using (Html.BeginForm())
|
|
@using (Html.BeginForm())
|
|
|
{
|
|
{
|
|
@@ -24,59 +24,59 @@
|
|
|
|
|
|
|
|
@if (Model.Acces == ModeAcces.Modification)
|
|
@if (Model.Acces == ModeAcces.Modification)
|
|
|
{
|
|
{
|
|
|
- @Html.HiddenFor(model => contenu.Id)
|
|
|
|
|
|
|
+ @Html.HiddenFor(model => college.Id)
|
|
|
}
|
|
}
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.CodeRne, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<div class="col-md-10">
|
|
|
@if (Model.Acces == ModeAcces.Modification)
|
|
@if (Model.Acces == ModeAcces.Modification)
|
|
|
{
|
|
{
|
|
|
- @Html.EditorFor(model => contenu.Id, new { htmlAttributes = new { @class = "form-control", @disabled = true } })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.CodeRne, new { htmlAttributes = new { @class = "form-control", @disabled = true } })
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- @Html.EditorFor(model => contenu.Id, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.CodeRne, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
}
|
|
}
|
|
|
- @Html.ValidationMessageFor(model => contenu.Id, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.CodeRne, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<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" })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.Libelle, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Libelle, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.TypeCollege_Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.TypeCollege_Id, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<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" })
|
|
|
|
|
|
|
+ @Html.DropDownListFor(model => college.TypeCollege_Id, (Model.Bag["Select_TypeCollege"] as IEnumerable<SelectListItem>), htmlAttributes: new { @class = "form-control" })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.TypeCollege_Id, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Adresse, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Adresse, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<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" })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.Adresse, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Adresse, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- @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.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">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Commune, htmlAttributes: new { @class = "control-label col-md-2 required" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Commune, htmlAttributes: new { @class = "control-label col-md-2 required" })
|
|
|
<div class="col-md-4">
|
|
<div class="col-md-4">
|
|
|
<a class='modal-window-events' href="http://referentiel.bas-rhin.fr/picker/cd67/com67/" title="Selection commune (nouvelle fenetre)">Sélectionner une commune</a>
|
|
<a class='modal-window-events' href="http://referentiel.bas-rhin.fr/picker/cd67/com67/" title="Selection commune (nouvelle fenetre)">Sélectionner une commune</a>
|
|
|
<br />
|
|
<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 panel-default" id="Commune_Panel" name="Commune_Panel" style="@if (college.Commune_Insee == null) { <text>display: none;</text> }">
|
|
|
<div class="panel-heading clearfix">
|
|
<div class="panel-heading clearfix">
|
|
|
<h4 class="panel-title pull-left" style="padding-top: 7.5px;">
|
|
<h4 class="panel-title pull-left" style="padding-top: 7.5px;">
|
|
|
<i class="fa fa-map-marker color1" aria-hidden="true"></i>
|
|
<i class="fa fa-map-marker color1" aria-hidden="true"></i>
|
|
@@ -88,48 +88,48 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="panel-body" style="text-align: center;">
|
|
<div class="panel-body" style="text-align: center;">
|
|
|
<span>
|
|
<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 >
|
|
|
|
|
|
|
+ <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>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- @Html.ValidationMessageFor(model => contenu.Commune, "", new { @class = "text-danger" })
|
|
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Commune, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Code_Postal, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Code_Postal, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<div class="col-md-10">
|
|
|
- Code(s) postal(aux) associé(s) à la commune <span id="CP-warning" class="text-danger" style="@if (Model.Listes["Code_Postal"].Count() == 1) { <text>display: none;</text> }">(attention, plusieurs choix possibles)</span> : <input id="code_postaux" data-picker="commune.code_postal" value="@String.Join(",", Model.Listes["Code_Postal"].Select(i => i.Text))" class="disabled-input-as-label" />
|
|
|
|
|
|
|
+ Code(s) postal(aux) associé(s) à la commune <span id="CP-warning" class="text-danger" style="@if ((Model.Bag["Select_CodePostaux"] as IEnumerable<SelectListItem>).Count() == 1) { <text>display: none;</text> }">(attention, plusieurs choix possibles)</span> : <input id="code_postaux" data-picker="commune.code_postal" value="@String.Join(",", (Model.Bag["Select_CodePostaux"] as IEnumerable<SelectListItem>).Select(i => i.Text))" class="disabled-input-as-label" />
|
|
|
<br />
|
|
<br />
|
|
|
- @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.DropDownListFor(model => college.Code_Postal, (Model.Bag["Select_CodePostaux"] as IEnumerable<SelectListItem>), htmlAttributes: new { @class = "form-control" })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Code_Postal, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<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" })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.Tel, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Tel, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Fax, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Fax, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<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" })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.Fax, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Fax, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- @Html.LabelFor(model => contenu.Email, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
|
|
|
|
+ @Html.LabelFor(model => college.Email, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
|
<div class="col-md-10">
|
|
<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" })
|
|
|
|
|
|
|
+ @Html.EditorFor(model => college.Email, new { htmlAttributes = new { @class = "form-control" } })
|
|
|
|
|
+ @Html.ValidationMessageFor(model => college.Email, "", new { @class = "text-danger" })
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -139,7 +139,7 @@
|
|
|
@if (Model.Acces == ModeAcces.Creation)
|
|
@if (Model.Acces == ModeAcces.Creation)
|
|
|
{ @Html.ActionLink("Annuler", "Index") }
|
|
{ @Html.ActionLink("Annuler", "Index") }
|
|
|
else
|
|
else
|
|
|
- { @Html.ActionLink("Annuler", "Details", new { Id = Model.College_Id }) }
|
|
|
|
|
|
|
+ { @Html.ActionLink("Annuler", "Details", new { Id = college.Id }) }
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|