[guadec-web] Kill birthdate and make location optional for everyone



commit fc8cc268fe811b2d1948c66c9225646fe9ee31c7
Author: Pascal Terjan <pterjan gmail com>
Date:   Wed Jul 16 09:07:03 2014 +0000

    Kill birthdate and make location optional for everyone

 guadec/confirm-payment.php   |    5 +----
 guadec/js/calculate-total.js |    8 --------
 2 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/guadec/confirm-payment.php b/guadec/confirm-payment.php
index d1ed9ed..4e293fc 100644
--- a/guadec/confirm-payment.php
+++ b/guadec/confirm-payment.php
@@ -31,7 +31,6 @@ $sql = "CREATE TABLE $table_name (
   room VARCHAR(7),
   roommate text,
   payment VARCHAR(10) DEFAULT 'NoPayment',
-  bday date,
   UNIQUE KEY id (id)
 );";
 
@@ -52,7 +51,6 @@ if (!empty($_POST)) {
        
        $entry = (isset($_POST['entry-fee']))?(intval($_POST['entry-fee'])):0;
 
-       $bday = (isset($_POST['bday']))?(trim(sanitize_text_field($_POST['bday']))):'NA';
        $public = isset($_POST['public'])?'YES':'NO';
 
        $obfuscated_email = str_replace("@", " AT ", $email);
@@ -145,8 +143,7 @@ if (!empty($_POST)) {
                                 'gender' => $gender,
                                 'country' => $country,
                                 'payment' => $payment,
-                                'public' => $public,
-                                'bday' => $bday));
+                                'public' => $public));
        }
 }
        
diff --git a/guadec/js/calculate-total.js b/guadec/js/calculate-total.js
index f5a1aa5..f891285 100644
--- a/guadec/js/calculate-total.js
+++ b/guadec/js/calculate-total.js
@@ -65,7 +65,6 @@ function enableDisableA(obj) {
        if ($(obj).is(":checked")) {
                $("[name=arrival]").prop("disabled", false);
                $("[name=departure]").prop("disabled", false);
-               $('[name=bday]').prop("disabled", false);
                $("[name=room_type]").prop("disabled", false);
                $("[name=sponsored]").removeAttr('checked');
                $(".box-options-accom").removeClass("disabled");
@@ -74,7 +73,6 @@ function enableDisableA(obj) {
                $("[name=arrival]").prop("disabled", true);
                $("[name=departure]").prop("disabled", true);
                $("[name=room_type]").prop("disabled", true);
-               $("[name=bday]").prop("disabled", true);
                $(".box-options-accom").addClass("disabled");
        }
 }
@@ -200,12 +198,6 @@ $(function() {
 
      /*Form Submit related checks */
      $('form[name=registration]').submit(function(event){
-       if($("[value=accommodation]").is(':checked')){
-                       if(!$("[name=contact_country]").val() || !$("[name=bday]").val()){
-                               alert("Make sure you enter your location and date of birth");
-                               event.preventDefault();
-                       }
-               }
                if(!$("[name=contact_name]").val() || !$("[name=contact_email]").val()) {
                        alert("Make sure you enter your name and email", $('.accomfee').html());
                        event.preventDefault();


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