Merge pull request #253 from edx/bseverino/surveymonkey
Add SurveyMonkey widget to IDV submitted page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { getConfig } from '@edx/frontend-platform';
|
||||
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
|
||||
|
||||
@@ -6,6 +6,16 @@ import BasePanel from './BasePanel';
|
||||
|
||||
import messages from '../IdVerification.messages';
|
||||
|
||||
function Survey() {
|
||||
useEffect(() => {
|
||||
const widget = document.createElement('script');
|
||||
widget.src = 'https://widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd_2BNHLyIwmuFE7cezwkskiizA4JjaHjQx10Eruz64ZqW8.js';
|
||||
document.body.appendChild(widget);
|
||||
}, []);
|
||||
|
||||
return <div id="smcx-sdk" />;
|
||||
}
|
||||
|
||||
function SubmittedPanel(props) {
|
||||
const panelSlug = 'submitted';
|
||||
return (
|
||||
@@ -16,9 +26,10 @@ function SubmittedPanel(props) {
|
||||
<p>
|
||||
{props.intl.formatMessage(messages['id.verification.submitted.text'])}
|
||||
</p>
|
||||
<a className="btn btn-primary" href={`${getConfig().LMS_BASE_URL}/dashboard`}>
|
||||
<a className="btn btn-primary" href={`${getConfig().LMS_BASE_URL}/dashboard`} style={{ marginBottom: 50 }}>
|
||||
{props.intl.formatMessage(messages['id.verification.return'])}
|
||||
</a>
|
||||
<Survey />
|
||||
</BasePanel>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user