Commit 839c176d authored by Nathan Peraldi's avatar Nathan Peraldi

Merge branch 'master' into 8-formulaire-adhesion-indiquer-les-champs-obligatoires

# Conflicts:
#	contact.php
parents 16d9a5a5 3d5e7d1b
//liste des blocs qui peuvent être affichés / cachés
var blocks = ["link", "paraSecondSelection", "cotisation", "informationsCollectivite", "formulaireEPCIMutualisant", "boutonEnvoyer"];
var blocks = ["link", "paraSecondSelection", "cotisation", "informationsCollectivite", "formulaireEPCIMutualisant", "boutonEnvoyer","chorus_pro"];
var maxCotisation = 12000;
......@@ -59,14 +59,17 @@ function firstAction() {
else if (strUser === "Association") {
setCotisation("Association");
displayMask(["cotisation", "informationsCollectivite", "boutonEnvoyer"]);
document.getElementById("secondSelection").required = false;
setEPCIRequired(false);
setChorusProRequired(false);
} else if (strUser === "EPCIMutualisant") {
//formulaire contenant la formule spécifique à EPCI mutualisant
displayMask(["formulaireEPCIMutualisant"]);
setEPCIRequired(true);
setChorusProRequired(true);
} else if (strUser === "none") {
//premier choix avec des tirets
......@@ -80,6 +83,7 @@ function firstAction() {
displayMask(["paraSecondSelection"]);
setEPCIRequired(false);
setChorusProRequired(true);
}
}
......@@ -166,7 +170,7 @@ function secondAction() {
setCotisation(selectedTranch);
displayMask(["paraSecondSelection", "cotisation", "informationsCollectivite", "boutonEnvoyer"]);
displayMask(["paraSecondSelection", "cotisation", "informationsCollectivite", "boutonEnvoyer","chorus_pro"]);
} else {
displayMask(["paraSecondSelection"]);
}
......@@ -196,6 +200,12 @@ function setCotisation(id, x = 0) {
}
}
function setChorusProRequired(boolean){
document.getElementById("siretCollectivite").required = boolean;
document.getElementById("numeroEngagementCollectivite").required = boolean;
document.getElementById("codeCollectivite").required = boolean;
}
function setEPCIRequired(boolean) {
//le formulaire EPCI est il requis ? cela varie selon les choix faits par l'utilisateur
document.getElementById("nombreHabitantsEPCI").required = boolean;
......@@ -221,12 +231,12 @@ function traitementEPCIMutualisant() {
if (resultat > maxCotisation) {
//valeur fixée en haut du document
//valeur fixée en haut du code
resultat = maxCotisation;
}
setCotisation("EPCIMutualisant", resultat);
displayMask(["cotisation", "informationsCollectivite", "formulaireEPCIMutualisant", "boutonEnvoyer"]);
displayMask(["cotisation", "informationsCollectivite", "formulaireEPCIMutualisant", "boutonEnvoyer","chorus_pro"]);
}
}
}
......
......@@ -94,8 +94,6 @@ if (isset($_POST)) {
}
}
}
get_header();
?>
......@@ -201,7 +199,6 @@ get_header();
return true;
}
}
return false;
}
......@@ -321,7 +318,6 @@ get_header();
</option>
<?php
}
//la tranche pour la cotisation
$tranch = $classInTreatment . "-T" . $counter;
......@@ -331,7 +327,6 @@ get_header();
name="optionSelect2"><?php echo $actualLine[1] ?></option>
<?php
$counter += 1;
}
?>
......@@ -369,8 +364,6 @@ get_header();
<?php
$counter += 1;
}
?>
......@@ -381,7 +374,6 @@ get_header();
</div>
<div id="informationsCollectivite">
<h3>Coordonnées :</h3>
<p>Les champs portant une astérisque
......@@ -438,6 +430,9 @@ get_header();
<?php generateDates(); ?>
</select>
</div>
<div id="chorus_pro">
<h3>Informations relatives à Chorus Pro</h3>
......
......@@ -21,8 +21,8 @@ function childrens_of_member_category($category)
foreach ($childrens as $c) {
$temp_category = get_category($c); //objet contenant les infos de la catégorie enfant
$my_link = "<a href=\"?cat=";
$my_link .= $c ;
$my_link = "<a href=\"?cat=";
$my_link .= $c;
$my_link .= "\" class=\"adullact-sort-button";
if ($temp_category->name == $category) {
......@@ -30,10 +30,10 @@ function childrens_of_member_category($category)
$my_link .= " adullact-selected";
}
$my_link .="\">";
$my_link .= "\">";
$my_link .= $temp_category->name;
$my_link.="</a>";
$my_link .= "</a>";
echo $my_link;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment