From: Greg Burri Date: Thu, 10 Sep 2009 15:48:47 +0000 (+0200) Subject: MOD #133 (à tester) X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=commitdiff_plain;h=fcf5e5bc507ea3eca99a70537bb1e48f8aeb455a MOD #133 (à tester) --- diff --git a/index.php b/index.php index d0629dd..8fc2259 100644 --- a/index.php +++ b/index.php @@ -35,10 +35,14 @@ echo ''; - '; + '; + + # Des constantes stockées en BD accessible par le javascript. echo ''; echo ''; + echo ''; ?> Corcelles-Lan 7 diff --git a/js/cl7.js b/js/cl7.js index d482fdc..6197569 100644 --- a/js/cl7.js +++ b/js/cl7.js @@ -43,13 +43,17 @@ cl7.verification_formulaire_inscription = function(util) { return true; }; -cl7.maj_prix_inscription = function() { - var nbPeriodes = $('#formulaireInscription input[name="periodes[]"]:checked').length; +cl7.maj_prix_inscription = function() { + var prixTotal = (int)($('meta[name="cout_total"]').attr('content')); + var prixPeriode = (int)($('meta[name="cout_periode"]').attr('content')); + var nbPeriodesTotal = (int)($('meta[name="nb_periodes"]').attr('content')); + var nbPeriodesCheck = (int)($('#formulaireInscription input[name="periodes[]"]:checked').length); + var prix = 5; - if (nbPeriodes === 3) { - prix = 40; - } else if (nbPeriodes != 0) { - prix = 15 * nbPeriodes; + if (nbPeriodesCheck === nbPeriodesTotal) { + prix = prixTotal; + } else if (nbPeriodesCheck != 0) { + prix = prixPeriode * nbPeriodesCheck; } $('#formulaireInscription span#prix').html(prix.toString()); }; diff --git a/php/tx_informations.php b/php/tx_informations.php index b488429..017de27 100644 --- a/php/tx_informations.php +++ b/php/tx_informations.php @@ -1,5 +1,5 @@ - - + +

Une puissante LAN aura lieu du vendredi 21 Novembre au Lundi 24 Novembre à Corcelles [NE]

Heures

@@ -23,13 +23,13 @@

Prix

Lieu