From 93409cb2ccb50c2f3d3dbb6950b077d9c1031057 Mon Sep 17 00:00:00 2001 From: Matt Hoover Date: Thu, 5 Mar 2020 17:59:59 -0500 Subject: [PATCH 1/6] Remove some rogue semicolons --- parts/section.positions.part.html | 4 ++-- site/careers.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parts/section.positions.part.html b/parts/section.positions.part.html index eb1de8a..5bdd6f8 100644 --- a/parts/section.positions.part.html +++ b/parts/section.positions.part.html @@ -30,8 +30,8 @@

ABOUT THE POSITION:

Responsibilities
diff --git a/site/careers.html b/site/careers.html index 4eeb097..15986f1 100644 --- a/site/careers.html +++ b/site/careers.html @@ -95,8 +95,8 @@

ABOUT THE POSITION:

Responsibilities
From db1ed9271e39aae708f036ccff6c94bf33c86b23 Mon Sep 17 00:00:00 2001 From: Matt Hoover Date: Fri, 6 Mar 2020 05:56:01 -0500 Subject: [PATCH 2/6] Fix indentation on `contact-form.js` --- site/js/contact-form.js | 96 +++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/site/js/contact-form.js b/site/js/contact-form.js index 1e7a18a..ad163e8 100755 --- a/site/js/contact-form.js +++ b/site/js/contact-form.js @@ -1,57 +1,59 @@ function submitToAPI(e) { - e.preventDefault(); - var URL = "https://glfy96rnq4.execute-api.us-east-1.amazonaws.com/contact-form-production-api-stage/oke-engineering-contact-form-api-resource"; + e.preventDefault(); + var URL = "https://glfy96rnq4.execute-api.us-east-1.amazonaws.com/contact-form-production-api-stage/oke-engineering-contact-form-api-resource"; - var Namere = /[A-Za-z]{1}[A-Za-z]/; - if (!Namere.test($("#name-input").val())) { - alert ("Name can not less than 2 char"); - return; - } - var mobilere = /[0-9]{10}/; - if (!mobilere.test($("#phone-input").val())) { - alert ("Please enter valid mobile number"); - return; - } - if ($("#email-input").val()=="") { - alert ("Please enter your email id"); - return; - } + var Namere = /[A-Za-z]{1}[A-Za-z]/; + if (!Namere.test($("#name-input").val())) { + alert ("Name can not less than 2 char"); + return; + } + var mobilere = /[0-9]{10}/; + if (!mobilere.test($("#phone-input").val())) { + alert ("Please enter valid mobile number"); + return; + } + if ($("#email-input").val()=="") { + alert ("Please enter your email id"); + return; + } - var reeamil = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,6})?$/; - if (!reeamil.test($("#email-input").val())) { - alert ("Please enter valid email address"); - return; - } + var reeamil = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,6})?$/; + if (!reeamil.test($("#email-input").val())) { + alert ("Please enter valid email address"); + return; + } - var name = $("#name-input").val(); - var phone = $("#phone-input").val(); - var email = $("#email-input").val(); - var desc = $("#description-input").val(); - var data = { - name : name, - phone : phone, - email : email, - desc : desc - }; + var name = $("#name-input").val(); + var phone = $("#phone-input").val(); + var email = $("#email-input").val(); + var desc = $("#description-input").val(); + var file = $("#file-input").val(); + var data = { + name : name, + phone : phone, + email : email, + desc : desc, + file : file + }; - $.ajax({ - type: "POST", - url : "https://glfy96rnq4.execute-api.us-east-1.amazonaws.com/contact-form-production-api-stage/oke-engineering-contact-form-api-resource", - dataType: "json", - crossDomain: "true", - contentType: "application/json; charset=utf-8", 'Access-Control-Allow-Origin': '*', - data: JSON.stringify(data), + $.ajax({ + type: "POST", + url : URL, + dataType: "json", + crossDomain: "true", + contentType: "application/json; charset=utf-8", 'Access-Control-Allow-Origin': '*', + data: JSON.stringify(data), - success: function () { + success: function () { // clear form and show a success message alert("Successfull"); - document.getElementById("contact-form").reset(); - location.reload(); - }, - error: function () { - // show an error message - alert("UnSuccessfull"); - } - }); + document.getElementById("contact-form").reset(); + location.reload(); + }, + error: function () { + // show an error message + alert("UnSuccessfull"); + } + }); } From 7ecafd14ddc4162ad90bc3748845ce8eaf4d3364 Mon Sep 17 00:00:00 2001 From: Matt Hoover Date: Fri, 6 Mar 2020 05:57:19 -0500 Subject: [PATCH 3/6] Remove old contact form js file --- site/js/contact_me.js | 75 ------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100755 site/js/contact_me.js diff --git a/site/js/contact_me.js b/site/js/contact_me.js deleted file mode 100755 index 6e91590..0000000 --- a/site/js/contact_me.js +++ /dev/null @@ -1,75 +0,0 @@ -$(function() { - - $("#contactForm input,#contactForm textarea").jqBootstrapValidation({ - preventSubmit: true, - submitError: function($form, event, errors) { - // additional error messages or events - }, - submitSuccess: function($form, event) { - event.preventDefault(); // prevent default submit behaviour - // get values from FORM - var name = $("input#name").val(); - var email = $("input#email").val(); - var phone = $("input#phone").val(); - var message = $("textarea#message").val(); - var firstName = name; // For Success/Failure Message - // Check for white space in name for Success/Fail message - if (firstName.indexOf(' ') >= 0) { - firstName = name.split(' ').slice(0, -1).join(' '); - } - $this = $("#sendMessageButton"); - $this.prop("disabled", true); // Disable submit button until AJAX call is complete to prevent duplicate messages - $.ajax({ - url: "././mail/contact_me.php", - type: "POST", - data: { - name: name, - phone: phone, - email: email, - message: message - }, - cache: false, - success: function() { - // Success message - $('#success').html("
"); - $('#success > .alert-success').html(""); - $('#success > .alert-success') - .append("Your message has been sent. "); - $('#success > .alert-success') - .append('
'); - //clear all fields - $('#contactForm').trigger("reset"); - }, - error: function() { - // Fail message - $('#success').html("
"); - $('#success > .alert-danger').html(""); - $('#success > .alert-danger').append($("").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!")); - $('#success > .alert-danger').append('
'); - //clear all fields - $('#contactForm').trigger("reset"); - }, - complete: function() { - setTimeout(function() { - $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete - }, 1000); - } - }); - }, - filter: function() { - return $(this).is(":visible"); - }, - }); - - $("a[data-toggle=\"tab\"]").click(function(e) { - e.preventDefault(); - $(this).tab("show"); - }); -}); - -/*When clicking on Full hide fail/success boxes */ -$('#name').focus(function() { - $('#success').html(''); -}); From c874a85d75a7a6842cf6149c1017ed6760f37474 Mon Sep 17 00:00:00 2001 From: Matt Hoover Date: Fri, 6 Mar 2020 06:20:23 -0500 Subject: [PATCH 4/6] Update positions contact form and put it back on careers page --- site/careers.html | 57 +++++++++++++++++++++++++++++++++++++++++ site/css/agency.css | 8 +++++- site/js/contact-form.js | 2 +- 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/site/careers.html b/site/careers.html index 15986f1..ad1e096 100644 --- a/site/careers.html +++ b/site/careers.html @@ -135,6 +135,63 @@

Send your Resume and Cover Letter to +
+
+
+

Submit your application

+ +
+
+
+
+
+
+
+
+ + +

+
+
+ + +

+
+
+ + +

+
+
+ + +

+
+
+
+
+ + +

+
+
+
+
+
+ +
+
+
+
+
+
+ + +