De Forum des Usages Coopératifs
Ligne 10 : | Ligne 10 : | ||
var debug = true; // -1 en prod, 1 en phase de test | var debug = true; // -1 en prod, 1 en phase de test | ||
+ | var tarifDouche = </html>{{{tarif_douche}}}<html>; // cout d'un hébergement individuel pour une nuit | ||
var tarifNoDouche = </html>{{{tarif_nodouche}}}<html>; // cout d'un hébergement individuel pour une nuit | var tarifNoDouche = </html>{{{tarif_nodouche}}}<html>; // cout d'un hébergement individuel pour une nuit | ||
var tarifRepas = </html>{{{tarif_repas}}}<html>; // cout d'un repas | var tarifRepas = </html>{{{tarif_repas}}}<html>; // cout d'un repas | ||
Ligne 136 : | Ligne 137 : | ||
var fieldReduitB = 'input_' + (</html>{{{field_frais}}}<html> + 4 + inc_max + inc_min); | var fieldReduitB = 'input_' + (</html>{{{field_frais}}}<html> + 4 + inc_max + inc_min); | ||
+ | // identifiant des radiobox définissant le type de chambre choisie | ||
+ | var fieldDouche = 'input_' + (</html>{{{field_douche}}}<html> + inc_max + inc_min + inc_contrib); | ||
var fieldNoDouche = 'input_' + (</html>{{{field_nodouche}}}<html> + inc_max + inc_min + inc_contrib); | var fieldNoDouche = 'input_' + (</html>{{{field_nodouche}}}<html> + inc_max + inc_min + inc_contrib); | ||
Ligne 196 : | Ligne 199 : | ||
// définition du tarif d'hébergement correspondant au type de chambre choisi | // définition du tarif d'hébergement correspondant au type de chambre choisi | ||
var tarifHebergement = 0; // init cout d'un hébergement individuel pour une nuit | var tarifHebergement = 0; // init cout d'un hébergement individuel pour une nuit | ||
− | if (document.getElementById(fieldNoDouche).checked) { | + | if (document.getElementById(fieldDouche).checked) { |
+ | tarifHebergement = tarifDouche; | ||
+ | if (debug == true) { | ||
+ | alert("douche : " + tarifDouche); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | else if (document.getElementById(fieldNoDouche).checked) { | ||
tarifHebergement = tarifNoDouche; | tarifHebergement = tarifNoDouche; | ||
if (debug == true) { | if (debug == true) { |
Version du 3 mai 2018 à 11:11