UNCLASSIFIED

Commit d3305aaa authored by luke.glasscock's avatar luke.glasscock
Browse files

Add initial changes for Google Doc removal

parent 4d5d008a
Pipeline #239788 passed with stage
in 59 seconds
...@@ -29,25 +29,27 @@ const ContactForm = ({ onClose, defaultService, ...rest }) => { ...@@ -29,25 +29,27 @@ const ContactForm = ({ onClose, defaultService, ...rest }) => {
setServices(defaultService); setServices(defaultService);
}, [defaultService]); }, [defaultService]);
const handleSubmit = (event) => { const handleSubmit = () => {
const data = new FormData(); window.open(
data.set('entry.1114584563', name); `mailto:AFLCMC.HN.DT3@us.af.mil?subject=Contact Form&body=Name:%0d%0a${name}%0d%0a%0d%0aEmail address:%0d%0a${email}%0d%0a%0d%0aServices or solutions you are interested in:%0d%0a${services}%0d%0a%0d%0aComments or details:%0d%0a${comments}%0d%0a%0d%0a`,
data.set('emailAddress', email); '_blank',
data.set('entry.533506743', services); 'width=800,height=500'
data.set('entry.297731592', comments); );
setSubmitting(true); /* Removing google docs submit */
fetch(
'https://docs.google.com/forms/d/e/1FAIpQLScsfrAHD8yKJGKF-yI_T9676FR-LDmmuBG_m8uY2TmP_zmZUg/formResponse', // setSubmitting(true);
{ // fetch(
mode: 'no-cors', // we don't care about the result of this request, so just do it. // 'https://docs.google.com/forms/d/e/1FAIpQLScsfrAHD8yKJGKF-yI_T9676FR-LDmmuBG_m8uY2TmP_zmZUg/formResponse',
method: 'POST', // {
body: data, // mode: 'no-cors', // we don't care about the result of this request, so just do it.
} // method: 'POST',
).then((res) => { // body: data,
setSubmitting(false); // }
setSuccess(true); // ).then((res) => {
}); // setSubmitting(false);
// setSuccess(true);
// });
}; };
return ( return (
......
...@@ -18,23 +18,38 @@ import { PrimaryButton, SecondaryButton } from './core'; ...@@ -18,23 +18,38 @@ import { PrimaryButton, SecondaryButton } from './core';
const korolevFont = 'korolev, Helvetica Neue, Helvetica, Arial, sans-serif'; const korolevFont = 'korolev, Helvetica Neue, Helvetica, Arial, sans-serif';
const FeedbackForm = ({ onClose }) => { const FeedbackForm = ({ onClose }) => {
/*
TODO: Jovany, will need to add initial state for form inputs here
...will also need to add onChange methods in the render section, similar to ContactForm.js
*/
const [submitting, setSubmitting] = useState(); const [submitting, setSubmitting] = useState();
const [success, setSuccess] = useState(); const [success, setSuccess] = useState();
const handleSubmit = (event) => { const handleSubmit = () => {
const data = new FormData(event.target); /*
setSubmitting(true); TODO: Jovany, will need to modify the body of the email to send input values
fetch( */
'https://docs.google.com/forms/d/e/1FAIpQLSf79Q_Cl2MC9wxUHUEZWvUAAehxUaGn_wKmJ014E49-ENaS3Q/formResponse',
{ window.open(
mode: 'no-cors', // we don't care about the result of this request, so just do it. `mailto:AFLCMC.HN.DT3@us.af.mil?subject=Feedback Form&body=`,
method: 'POST', '_blank',
body: data, 'width=800,height=500'
} );
).then((res) => {
setSubmitting(false); // setSubmitting(true);
setSuccess(true); // fetch(
}); // 'https://docs.google.com/forms/d/e/1FAIpQLSf79Q_Cl2MC9wxUHUEZWvUAAehxUaGn_wKmJ014E49-ENaS3Q/formResponse',
// {
// mode: 'no-cors', // we don't care about the result of this request, so just do it.
// method: 'POST',
// body: data,
// }
// ).then((res) => {
// setSubmitting(false);
// setSuccess(true);
// });
}; };
return ( return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment