From 8fc9b57e7d693aa84777d62213cb8159db792776 Mon Sep 17 00:00:00 2001 From: Chris Garrity Date: Fri, 28 Feb 2020 09:17:13 -0500 Subject: [PATCH 1/5] Add new Contact Us information page Using the Freshdesk Feedback form * adds new component HelpForm for the Freshdesk component * adds new contact-us view * modifies Information page css with style for a header on the right hand nav section * adds new route for the contact-us page (is identical to the old scratchr2 URL) --- src/components/helpform/helpform.jsx | 57 ++++++++++++++++++ .../informationpage/informationpage.scss | 5 ++ src/routes.json | 8 +++ src/views/contact-us/contact-us.jsx | 60 +++++++++++++++++++ src/views/contact-us/l10n.json | 16 +++++ 5 files changed, 146 insertions(+) create mode 100644 src/components/helpform/helpform.jsx create mode 100644 src/views/contact-us/contact-us.jsx create mode 100644 src/views/contact-us/l10n.json diff --git a/src/components/helpform/helpform.jsx b/src/components/helpform/helpform.jsx new file mode 100644 index 00000000000..3f5deb79e07 --- /dev/null +++ b/src/components/helpform/helpform.jsx @@ -0,0 +1,57 @@ +const connect = require('react-redux').connect; +const PropTypes = require('prop-types'); +const React = require('react'); +const FormattedMessage = require('react-intl').FormattedMessage; + +const HelpForm = props => { + const prefix = 'https://mitscratch.freshdesk.com/widgets/feedback_widget/new?&widgetType=embedded&widgetView=yes&screenshot=No&searchArea=No&captcha=yes'; + const title = `formTitle=${props.title}`; + const username = `helpdesk_ticket[custom_field][cf_scratch_name_40167]=${props.user.username || ''}`; + const agentText = encodeURI(window.navigator.userAgent.replace(';', ' -')); + const browser = `helpdesk_ticket[custom_field][cf_browser_40167]=${agentText}`; + return ( +
+