-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d02948
commit 96e4996
Showing
5 changed files
with
100 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import * as React from "react"; | ||
import * as _ from 'lodash'; | ||
import {Modal} from "react-bootstrap"; | ||
|
||
interface ITrialMatchFeedbackProps { | ||
show: boolean; | ||
isTrialFeedback?: boolean; | ||
title: string; | ||
userEmailAddress: string; | ||
nctId?: string; | ||
protocolNo?: string; | ||
onHide: () => void; | ||
} | ||
|
||
export default class TrialMatchFeedback extends React.Component<ITrialMatchFeedbackProps, {}> { | ||
public render() | ||
{ | ||
let src = ''; | ||
if (!_.isUndefined(this.props.isTrialFeedback) && this.props.isTrialFeedback) { | ||
const url = "https://docs.google.com/forms/d/e/1FAIpQLSfcoLRG0iWO_qUb4hfzWFQ1toP575EKCTwqPcXE9DmMzuS34w/viewform"; | ||
const nctIdParam = `entry.1070287537=${this.props.nctId || ''}`; | ||
const protocolNoParam = `entry.699867040=${this.props.protocolNo || ''}`; | ||
const userParam = `entry.1655318994=${this.props.userEmailAddress || ''}`; | ||
const uriParam = `entry.1782078941=${encodeURIComponent(window.location.href)}`; | ||
src = `${url}?${userParam}&${uriParam}&${nctIdParam}&${protocolNoParam}&embedded=true`; | ||
} else { | ||
const url = "https://docs.google.com/forms/d/e/1FAIpQLSes1WuMattmo_aT8-34LaPRTC47vVzvdWMgYZ5tSuw8EHoLZw/viewform"; | ||
const userParam = `entry.251841421=${this.props.userEmailAddress || ''}`; | ||
const uriParam = `entry.1295500928=${encodeURIComponent(window.location.href)}`; | ||
src = `${url}?${userParam}&${uriParam}&embedded=true`; | ||
} | ||
|
||
return ( | ||
<Modal show={this.props.show} onHide={this.props.onHide}> | ||
<Modal.Header closeButton> | ||
<Modal.Title>{this.props.title}</Modal.Title> | ||
</Modal.Header> | ||
<Modal.Body> | ||
<iframe | ||
src={src} | ||
style={{width:550, height:700, border:"none", marginLeft:"10px"}} | ||
marginHeight={0} | ||
marginWidth={0} | ||
> | ||
<i className="fa fa-spinner fa-pulse fa-2x" /> | ||
</iframe> | ||
</Modal.Body> | ||
</Modal> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters