[guadec-web] created templated for registration pages, added extra fiels for accomodation - props Saumya Dwivedi



commit 03e5c2ba37905b1cc4da7a059c85c913a3cee823
Author: Fabiana Simões <fabianapsimoes gmail com>
Date:   Fri Jul 4 19:04:21 2014 +0200

    created templated for registration pages, added extra fiels for accomodation - props Saumya Dwivedi (dvd)

 guadec/{page-1557.php => access-register.php} |    5 +++++
 guadec/{page-test.php => confirm-payment.php} |   11 ++++++++++-
 guadec/js/calculate-total.js                  |   16 ++++++++++++----
 3 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/guadec/page-1557.php b/guadec/access-register.php
similarity index 97%
rename from guadec/page-1557.php
rename to guadec/access-register.php
index b1680c3..9fcc519 100644
--- a/guadec/page-1557.php
+++ b/guadec/access-register.php
@@ -1,4 +1,9 @@
 <?php
+/*
+Template Name: Access Registration
+*/
+?>
+<?php
 // Restricted Admin Access. View Registration details.
 global $wpdb;
 function display_result($result){
diff --git a/guadec/page-test.php b/guadec/confirm-payment.php
similarity index 94%
rename from guadec/page-test.php
rename to guadec/confirm-payment.php
index 3d8548f..02bf75b 100644
--- a/guadec/page-test.php
+++ b/guadec/confirm-payment.php
@@ -1,4 +1,9 @@
 <?php
+/*
+Template Name: Confirm Payment
+*/
+?>
+<?php
 //require_once('../../../wp-load.php')
 
 $application_submitted = false;
@@ -21,6 +26,8 @@ if (!empty($_POST)) {
        $lamount = (isset($_POST['lfee']))?($_POST['lfee']):'0';
        $aamount = (isset($_POST['lfee']))?($_POST['afee']):'0';
        $tamount = (isset($_POST['lfee']))?($_POST['tfee']):'0';
+       $bday = (isset($_POST['bday']))?($_POST['tfee']):'NA';
+       $student =  ($_POST['student'] == true)?"YES":"NA";
 
        $obfuscated_email = str_replace("@", " AT ", $email);
        
@@ -79,7 +86,9 @@ if (!empty($_POST)) {
                                 'irc' => $irc,
                                 'gender' => $gender,
                                 'country' => $country,
-                                'payment_status' => $payment));        
+                                'payment_status' => $payment,
+                                'student' => $student,
+                                'bday' => $bday));     
        }
 }
        
diff --git a/guadec/js/calculate-total.js b/guadec/js/calculate-total.js
index 34f3056..7e3cf2d 100644
--- a/guadec/js/calculate-total.js
+++ b/guadec/js/calculate-total.js
@@ -141,15 +141,23 @@ $(function() {
                });
        });
        // Enable Disable the submit button
-       $('input[type="submit"]').attr('disabled','disabled');
+       $('input[name=regsub]').attr('disabled','disabled');
      $('input[name="policy"]').click(function() {
         if($(this).is(':checked')) {
-           $('input[type="submit"]').removeAttr('disabled');
+           $('input[name=regsub]').removeAttr('disabled');
         }
         else {
-               $('input[type="submit"]').attr('disabled','disabled');
-               
+               $('input[name=regsub]').attr('disabled','disabled');
         }
      });
+     $('form[name=registration]').submit(function(event){
+       if($("[value=accommodation]").is(':checked')){
+                       if(!$("[name=contact_country]").val()){
+                               alert("Make sure you enter the birth country, date of birth and agree to 
anti-harassment policy");
+                               event.preventDefault();
+                       }
+               }
+     });
+     
 });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]