UNCLASSIFIED

Commit a5dc032e authored by Jovany Espinoza's avatar Jovany Espinoza
Browse files

Bull-737

parent d3305aaa
Pipeline #244376 passed with stage
in 58 seconds
...@@ -24,20 +24,35 @@ const FeedbackForm = ({ onClose }) => { ...@@ -24,20 +24,35 @@ const FeedbackForm = ({ onClose }) => {
...will also need to add onChange methods in the render section, similar to ContactForm.js ...will also need to add onChange methods in the render section, similar to ContactForm.js
*/ */
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [thoughts, setThoughts] = useState('');
const [volunteer, setVolunteer] = useState(false);
const [submitting, setSubmitting] = useState(); const [submitting, setSubmitting] = useState();
const [success, setSuccess] = useState(); const [success, setSuccess] = useState();
const handleSubmit = () => { const handleSubmit = () => {
/* /*
TODO: Jovany, will need to modify the body of the email to send input values TODO: Jovany, will need to modify the body of the email to send input values
*/ */
window.open(
`mailto:AFLCMC.HN.DT3@us.af.mil?subject=Feedback Form&body=Name:%0d%0a${name}%0d%0a%0d%0aEmail:%0d%0a${email}%0d%0a%0d%0aThoughts:%0d%0a${thoughts}%0d%0a%0d%0aVolunteer:%0d%0a${volunteer}%0d%0a%0d%0a`,
'_blank',
'width=800,height=500'
);
/*
window.open( window.open(
`mailto:AFLCMC.HN.DT3@us.af.mil?subject=Feedback Form&body=`, `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`,
'_blank', '_blank',
'width=800,height=500' 'width=800,height=500'
); );
*/
// setSubmitting(true); // setSubmitting(true);
// fetch( // fetch(
// 'https://docs.google.com/forms/d/e/1FAIpQLSf79Q_Cl2MC9wxUHUEZWvUAAehxUaGn_wKmJ014E49-ENaS3Q/formResponse', // 'https://docs.google.com/forms/d/e/1FAIpQLSf79Q_Cl2MC9wxUHUEZWvUAAehxUaGn_wKmJ014E49-ENaS3Q/formResponse',
...@@ -97,6 +112,9 @@ const FeedbackForm = ({ onClose }) => { ...@@ -97,6 +112,9 @@ const FeedbackForm = ({ onClose }) => {
id="text-input-comments" id="text-input-comments"
name="entry.675672969" name="entry.675672969"
style={{ height: '100px' }} style={{ height: '100px' }}
value={thoughts}
onChange={(e) => setThoughts(e.target.value)}
/> />
</FormField> </FormField>
<ThemeContext.Extend <ThemeContext.Extend
...@@ -106,7 +124,8 @@ const FeedbackForm = ({ onClose }) => { ...@@ -106,7 +124,8 @@ const FeedbackForm = ({ onClose }) => {
<CheckBox <CheckBox
id="checkbox-panel" id="checkbox-panel"
name="entry.619303959" name="entry.619303959"
value="volunteer" checked={volunteer}
onChange={(e) => setVolunteer(e.target.checked)}
label={ label={
<Box> <Box>
<Text weight="bold" size="small"> <Text weight="bold" size="small">
...@@ -134,7 +153,8 @@ const FeedbackForm = ({ onClose }) => { ...@@ -134,7 +153,8 @@ const FeedbackForm = ({ onClose }) => {
</Text> </Text>
} }
> >
<TextInput id="text-input-name" name="entry.1573591932" /> <TextInput id="text-input-name" name="entry.1573591932" value={name}
onChange={(e) => setName(e.target.value)} />
</FormField> </FormField>
<FormField <FormField
name="entry.18763422251876342225" name="entry.18763422251876342225"
...@@ -148,7 +168,9 @@ const FeedbackForm = ({ onClose }) => { ...@@ -148,7 +168,9 @@ const FeedbackForm = ({ onClose }) => {
</Text> </Text>
} }
> >
<TextInput id="text-input-email" name="entry.1876342225" /> <TextInput id="text-input-email" name="entry.1876342225" value={email}
onChange={(e) => setEmail(e.target.value)} />
</FormField> </FormField>
<Box pad={{ top: 'medium' }} align="center" justify="center"> <Box pad={{ top: 'medium' }} align="center" justify="center">
......
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