diff --git a/src/main/webapp/bootcamp/css/main.css b/src/main/webapp/bootcamp/css/main.css index 8dfae257e..1e66b011d 100644 --- a/src/main/webapp/bootcamp/css/main.css +++ b/src/main/webapp/bootcamp/css/main.css @@ -556,7 +556,7 @@ ul{ /*background: #fff url(../img/who.png) center bottom no-repeat;*/ background-color: #f7f7f9; text-align: center; - padding-top: 150px; + padding-top: 130px; padding-bottom: 50px; width: 100%; height: 350px; @@ -576,7 +576,7 @@ ul{ width: 80%; line-height: 22px; margin: auto; - background-color: #e4e5e5; + background-color: #c9f8fe; display: inline; padding: 3px 10px; -webkit-border-radius: 5px; diff --git a/src/main/webapp/bootcamp/img/who.png b/src/main/webapp/bootcamp/img/who.png index 264a86149..8395d7704 100644 Binary files a/src/main/webapp/bootcamp/img/who.png and b/src/main/webapp/bootcamp/img/who.png differ diff --git a/src/main/webapp/bootcamp/index-vi.html b/src/main/webapp/bootcamp/index-vi.html index d47c658ad..a58bf273e 100644 --- a/src/main/webapp/bootcamp/index-vi.html +++ b/src/main/webapp/bootcamp/index-vi.html @@ -48,10 +48,10 @@

Lean Vietnam Boo
    -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
@@ -278,38 +278,38 @@

Đăng kí tham gia

- +
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/main/webapp/bootcamp/index.html b/src/main/webapp/bootcamp/index.html index 6757f12f0..9e5b22449 100644 --- a/src/main/webapp/bootcamp/index.html +++ b/src/main/webapp/bootcamp/index.html @@ -6,6 +6,19 @@ Lean Vietnam Boot Camp + + + + + + + + + + + + + @@ -48,10 +61,10 @@

Lean Vietnam Boo
    -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
@@ -272,14 +285,13 @@

Registration Form

-
- +
@@ -287,7 +299,7 @@

Registration Form

- +
@@ -299,7 +311,7 @@

Registration Form

- +
@@ -308,7 +320,6 @@

Registration Form

-
diff --git a/src/main/webapp/bootcamp/js/main.js b/src/main/webapp/bootcamp/js/main.js index 9c36c431f..f2608a55b 100644 --- a/src/main/webapp/bootcamp/js/main.js +++ b/src/main/webapp/bootcamp/js/main.js @@ -10,7 +10,7 @@ $(document).ready(function() { menuAnimate(); contentAnimate(); invalidationData(); - + shareSocial(); }); function menuManager(){ var icMenu = $('.fa-bars'), @@ -99,23 +99,22 @@ function contentAnimate(){ } function invalidationData() { - $('.register').click(function(event){ + $('button.register').click(function(event){ event.preventDefault(); - //var nameReg = /^[A-Za-z]+$/; var numberReg = /^[0-9]+$/; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var errorContent = ''; var fName = $('#txtFirstName').val(), - lName = $('#txtLastName').val(), + //lName = $('#txtLastName').val(), job = $('#txtCurrentJob').val(), email = $('#txtEmail').val(), phoneNumber = $('#txtPhone').val(), companyName = $('#txtCompany').val(), - location = $('#txtLocation').val(), - birthday = $('#txtBirthDay').val(); + location = $('#txtLocation').val(); + //birthday = $('#txtBirthDay').val(); - var inputVal = new Array(fName, lName, job, email, phoneNumber); - var inputMessage = new Array("first name", "last name", "current job title" , "email address", "telephone number"); + var inputVal = new Array(fName, companyName, job, email, phoneNumber, location); + var inputMessage = new Array("first name", "company name", "current job title" , "email address", "telephone number", 'location'); $('.error-messages').html(''); $.each(inputVal, function( index, value ) { if(value == ""){ @@ -128,44 +127,105 @@ function invalidationData() { }); if(phoneNumber != '' && !numberReg.test(phoneNumber)){ if(errorContent == ''){ - errorContent = 'Numbers only'; + errorContent = 'Telephone Numbers only'; }else{ - errorContent = errorContent + ', Numbers only'; + errorContent = errorContent + ', Telephone Numbers only'; } } if(email != '' && !emailReg.test(email)){ if(errorContent == ''){ - errorContent = 'Please enter a valid email address'; + errorContent = 'Email address is not valid'; }else{ - errorContent = errorContent+ ', Please enter a valid email address'; + errorContent = errorContent+ ', Email address is not valid'; } } if(errorContent != ''){ $('.error-messages').append('Please enter your ' + errorContent+ ''); }else{ - var userInfo = '{"firstName": "' + fName + '", "lastName" : "' + lName + '", "currentJobTitle": "' + job + '", "emailAddress" : "' + email + '", "phoneNumber": "' + phoneNumber + '", "companyName" : "' + companyName + '", "location" : "' + location + '", "birthday" : "' + birthday + '"}'; - sendData(userInfo); + var today = currentDate(); + var subject = today + ' – LeanVietnamBootCamp - ' + fName; + $.ajax({ + type: 'POST', + url: 'http://leads.navigosgroup.com/api/leads', + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + Subject: subject, + EmailAddress1: email, + Telephone1: phoneNumber, + "FirstName": fName, + "CompanyName": companyName, + Qntt_Source: 'ONLINE', + LeadQualifyCode: 'HOT', + Qntt_LegalName: companyName, + CampaignId: 'ONLINE-LeanVietnamBootCamp', + Qntt_City: location + }) + , success: function (data) { + resetField(); + alert('Thank you for registering for Lean Vietnam Bootcamp'); + }, error: function (err) { + switch (err.status) { + case 500: // internal server error or duplication found + console.log(err.responseJSON.Message); + break; + case 400: // validation failed. The error details is the array ModelState + $.each(err.responseJSON.ModelState, function (index, validationError) { + console.log(validationError); + }); + break; + default: + console.debug(err.responseJSON); + break; + } + } + }); } }); } -function sendData(userInfo){ - $.ajax({ - type: 'POST', - url: 'users', - data: userInfo, - success: function(data) {resetField();alert('Thank you'); }, - contentType: "application/json; charset=UTF-8", - dataType: 'json' - }); -} function resetField(){ $('#txtFirstName').val(''), $('#txtLastName').val(''), $('#txtCurrentJob').val(''), $('#txtEmail').val(''), - $('#txtPhone').val(''), + $('#txtPhone').val(''), $('#txtCompany').val(''), $('#txtLocation').val(''), $('#txtBirthDay').val(''); +} + +function currentDate(){ + var today = new Date(); + var dd = today.getDate(); + var mm = today.getMonth()+1; //January is 0! + var yyyy = today.getFullYear(); + + if(dd<10) { + dd='0'+dd; + } + + if(mm<10) { + mm='0'+mm; + } + + return today = mm+'/'+dd+'/'+yyyy; +} + +function shareSocial(){ + $('a.share-facebook').on('click', function() { + window.open(jQuery(this).attr('href'), 'wpcomfacebook', 'menubar=1,resizable=1,width=600,height=400'); + return false; + }); + $('a.share-linkedin').on('click', function() { + window.open(jQuery(this).attr('href'), 'wpcomlinkedin', 'menubar=1,resizable=1,width=580,height=450'); + return false; + }); + $('a.share-google-plus-1').on('click', function() { + window.open(jQuery(this).attr('href'), 'wpcomgoogle-plus-1', 'menubar=1,resizable=1,width=480,height=550'); + return false; + }); + $('a.share-twitter').on('click', function() { + window.open(jQuery(this).attr('href'), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350'); + return false; + }); } \ No newline at end of file