Remove unnecessary userAgent field

The Freshdesk form/widget collects Browser and OS meta data so there’s no need to duplicate it.
This commit is contained in:
Chris Garrity 2020-04-10 12:08:07 -04:00
parent d8df31587e
commit 93d7946af7

View file

@ -7,8 +7,6 @@ const HelpForm = props => {
const prefix = 'https://mitscratch.freshdesk.com/widgets/feedback_widget/new?&widgetType=embedded&widgetView=yes&screenshot=No&searchArea=No'; const prefix = 'https://mitscratch.freshdesk.com/widgets/feedback_widget/new?&widgetType=embedded&widgetView=yes&screenshot=No&searchArea=No';
const title = `formTitle=${props.title}`; const title = `formTitle=${props.title}`;
const username = `helpdesk_ticket[custom_field][cf_scratch_name_40167]=${props.user.username || ''}`; const username = `helpdesk_ticket[custom_field][cf_scratch_name_40167]=${props.user.username || ''}`;
const agentText = encodeURIComponent(window.navigator.userAgent);
const browser = `helpdesk_ticket[custom_field][cf_browser_40167]=${agentText}`;
const formSubject = `helpdesk_ticket[subject]=${props.subject}`; const formSubject = `helpdesk_ticket[subject]=${props.subject}`;
const formDescription = `helpdesk_ticket[description]=${props.body}`; const formDescription = `helpdesk_ticket[description]=${props.body}`;
return ( return (
@ -31,7 +29,7 @@ const HelpForm = props => {
height="744px" height="744px"
id="freshwidget-embedded-form" id="freshwidget-embedded-form"
scrolling="no" scrolling="no"
src={`${prefix}&${title}&${username}&${browser}&${formSubject}&${formDescription}`} src={`${prefix}&${title}&${username}&${formSubject}&${formDescription}`}
title={<FormattedMessage id="contactUs.questionsForum" />} title={<FormattedMessage id="contactUs.questionsForum" />}
width="100%" width="100%"
/> />