Commit a0acceaa authored by Nathan Peraldi's avatar Nathan Peraldi

Merge remote-tracking branch 'origin/master' into...

Merge remote-tracking branch 'origin/master' into 11-formulaire-adhesion-changer-la-phrase-de-choix-de-nature

# Conflicts:
#	contact.php
parents 112b669d 7da2dd86
//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"]);
}
}
}
......
......@@ -330,13 +330,12 @@ get_header();
name="optionSelect2"><?php echo $actualLine[1] ?></option>
<?php
$counter += 1;
}
?>
</select>
<?php tryToShowError("second Selection"); ?>
</p>
$counter += 1;
}
?>
</select>
<?php tryToShowError("second Selection"); ?>
</p>
<div id="cotisation">
......@@ -366,10 +365,8 @@ get_header();
</p>
<?php
$counter += 1;
}
$counter += 1;
}
?>
......@@ -379,65 +376,93 @@ get_header();
</div>
<div id="informationsCollectivite">
<h3>Informations obligatoires :</h3>
<label for="nomCollectivite">Nom de la collectivité :</label>
<input type="text" name="nomCollectivite" id="nomCollectivite" required=""
value="<?php tryToEcho("nomCollectivite"); ?>"><br>
<?php tryToShowError("nom"); ?>
<label for="adresseCollectivite">Adresse :</label>
<input type="text" name="adresseCollectivite" id="adresseCollectivite" required=""
value="<?php tryToEcho("adresseCollectivite"); ?>"><br>
<?php tryToShowError("adresse"); ?>
<label for="codePostalCollectivite">Code postal :</label>
<input type="text" name="codePostalCollectivite" id="codePostalCollectivite" required=""
value="<?php tryToEcho("codePostalCollectivite"); ?>"><br>
<?php tryToShowError("CP"); ?>
<label for="villeCollectivite">Ville :</label>
<input type="text" name="villeCollectivite" id="villeCollectivite" required=""
value="<?php tryToEcho("villeCollectivite"); ?>"><br>
<?php tryToShowError("ville"); ?>
<label for="telCollectivite">Téléphone :</label>
<input type="tel" name="telCollectivite" id="telCollectivite" required=""
value="<?php tryToEcho("telCollectivite"); ?>"><br>
<?php tryToShowError("tel"); ?>
<label for="siteCollectivite">Site internet :</label>
<input type="url" name="siteCollectivite" id="siteCollectivite" required=""
value="<?php tryToEcho("siteCollectivite"); ?>"><br>
<?php tryToShowError("site"); ?>
<label for="periodeAdhesionCollectivite">Période d'adhésion :</label>
<select name="periodeAdhesionCollectivite" id="periodeAdhesionCollectivite" required="">
<option class="optionPeriod" value="" selected>---</option>
<?php generateDates(); ?>
</select>
<div id="informationsCollectivite">
<h3>Coordonnées :</h3>
<p>Les champs portant une astérisque
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
sont obligatoires
</p>
<label for="nomCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
Nom de la collectivité :
</label>
<input type="text" name="nomCollectivite" id="nomCollectivite" required=""
value="<?php tryToEcho("nomCollectivite"); ?>"><br>
<?php tryToShowError("nom"); ?>
<label for="adresseCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
Adresse :</label>
<input type="text" name="adresseCollectivite" id="adresseCollectivite" required=""
value="<?php tryToEcho("adresseCollectivite"); ?>"><br>
<?php tryToShowError("adresse"); ?>
<label for="codePostalCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
Code postal :</label>
<input type="text" name="codePostalCollectivite" id="codePostalCollectivite" required=""
value="<?php tryToEcho("codePostalCollectivite"); ?>"><br>
<?php tryToShowError("CP"); ?>
<label for="villeCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
Ville :</label>
<input type="text" name="villeCollectivite" id="villeCollectivite" required=""
value="<?php tryToEcho("villeCollectivite"); ?>"><br>
<?php tryToShowError("ville"); ?>
<label for="telCollectivite">Téléphone :</label>
<input type="tel" name="telCollectivite" id="telCollectivite" required=""
value="<?php tryToEcho("telCollectivite"); ?>"><br>
<?php tryToShowError("tel"); ?>
<label for="siteCollectivite">Site internet :</label>
<input type="url" name="siteCollectivite" id="siteCollectivite" required=""
value="<?php tryToEcho("siteCollectivite"); ?>"><br>
<?php tryToShowError("site"); ?>
<label for="periodeAdhesionCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
Période d'adhésion :</label>
<select name="periodeAdhesionCollectivite" id="periodeAdhesionCollectivite" required="">
<option class="optionPeriod" value="" selected>---</option>
<?php generateDates(); ?>
</select>
</div>
<div id="chorus_pro">
<h3>Informations relatives à Chorus Pro</h3>
<label for="siretCollectivite">SIRET :</label>
<input type="number" name="siretCollectivite" id="siretCollectivite" required=""
value="<?php tryToEcho("siretCollectivite"); ?>"><br>
<?php tryToShowError("siret"); ?>
<label for="numeroEngagementCollectivite">N° d'engagement :</label>
<input type="text" name="numeroEngagementCollectivite" id="numeroEngagementCollectivite" required=""
value="<?php tryToEcho("numeroEngagementCollectivite"); ?>"><br>
<?php tryToShowError("numeroEngagement"); ?>
<label for="codeCollectivite">Code :</label>
<input type="text" name="codeCollectivite" id="codeCollectivite" required=""
value="<?php tryToEcho("codeCollectivite"); ?>"><br>
<?php tryToShowError("code"); ?>
<label for="siretCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
SIRET :
</label>
<input type="number" name="siretCollectivite" id="siretCollectivite" required=""
value="<?php tryToEcho("siretCollectivite"); ?>"><br>
<?php tryToShowError("siret"); ?>
<label for="numeroEngagementCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
N° d'engagement :
</label>
<input type="text" name="numeroEngagementCollectivite" id="numeroEngagementCollectivite"
required=""
value="<?php tryToEcho("numeroEngagementCollectivite"); ?>"><br>
<?php tryToShowError("numeroEngagement"); ?>
<label for="codeCollectivite">
<abbr class="adullact-abbr" title="Champ obligatoire">*</abbr>
Code :
</label>
<input type="text" name="codeCollectivite" id="codeCollectivite" required=""
value="<?php tryToEcho("codeCollectivite"); ?>"><br>
<?php tryToShowError("code"); ?>
</div>
......@@ -454,8 +479,4 @@ get_header();
</div>
</div>
<?php
get_footer();
?>
<?php get_footer(); ?>
\ No newline at end of file
......@@ -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