Skip to content

Commit

Permalink
update appsettings json file, fix custom attestation content
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen committed Feb 4, 2025
1 parent 575653f commit d7d1f4e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
14 changes: 11 additions & 3 deletions src/server/API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,18 @@
"RolesMapping": {
"User": "urn:mace:users",
"Super": "urn:mace:supers",
"Identified": "urn:mace:phi",
"Admin": "urn:mace:sudos",
"Federated": "urn:mace:federated"
}
}
},
"Attestation": {
"Enabled": true
"Enabled": true,
"Text": [
"HIV Success uses Leaf, a self-service tool which provides a user-friendly interface to execute queries and retrieve information about study data."
],
"Type": "text",
"SkipModeSelection": true
},
"Compiler": {
"Alias": "@",
Expand All @@ -72,6 +76,7 @@
"Export": {
"REDCap": {
"Enabled": false,
"Text": ["This is a test message"],
"ApiURI": "https://redcap.example.edu/api/",
"BatchSize": 10,
"RowLimit": 5000,
Expand All @@ -92,7 +97,7 @@
},
"Deidentification": {
"Patient": {
"Enabled": false,
"Enabled": true,
"DateShifting": {
"Increment": "DAY",
"LowerBound": -365,
Expand Down Expand Up @@ -131,6 +136,9 @@
"Enabled": true,
"Email": "[email protected]",
"URI": "https://www.example.edu/leaf-faq"
},
"piwik": {
"siteId": 35
}
},
"Notification": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,35 @@ export default class CustomAttestationConfirmation extends React.PureComponent<P

return (
<div className={confirmationClass}>
<div>

{/* Else use custom text */}
{useHtml &&
<div className={`${c}-custom-html`} dangerouslySetInnerHTML={ {__html: config.attestation.text.join("")} }></div>
}

{!useHtml &&
<div className={`${c}-custom-text-container`}>
{config.attestation.text.map((t,i) => {
return <p key={i} className={`${c}-custom-text`}>{t}</p>;
})}
</div>
}
</div>
{showText &&

<div>
<Row className={`${c}-confirmation-settings`} key='1'>
<Col md={6} className="left">
{/* <Col md={6} className="left">
{useDisplay} - {phiDisplay}
</Col>
</Col> */}
{!(isSubmittingAttestation || hasAttested) &&
<Col md={6} className="right">
<Col md={config && config.attestation.skipModeSelection ? 12: 6} className={`${config && config.attestation.skipModeSelection ? "" : "right"}`}>
<Button
onClick={handleIAgreeClick}
tabIndex={-1}
className="leaf-button leaf-button-primary">
I Agree
Access the Data Exploration Tool
</Button>
{config && !config.attestation.skipModeSelection &&
<Button
Expand All @@ -71,22 +86,6 @@ export default class CustomAttestationConfirmation extends React.PureComponent<P
</Col>
}
</Row>

<div>

{/* Else use custom text */}
{useHtml &&
<div className={`${c}-custom-html`} dangerouslySetInnerHTML={ {__html: config.attestation.text.join("")} }></div>
}

{!useHtml &&
<div className={`${c}-custom-text-container`}>
{config.attestation.text.map((t,i) => {
return <TextareaAutosize key={i} className={`${c}-custom-text`} defaultValue={t} readOnly={true} />;
})}
</div>
}
</div>
</div>
}
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/ui-client/src/containers/Attestation/Attestation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ class Attestation extends React.PureComponent<Props, State> {
sessionType: SessionType.Research
},
documentationExpDateString: '',
documentationStatusSelected: !config?.attestation?.documentStatusSelectionRequired,
documentationStatusSelected: false,
hasApprovedIrb: false,
hasApprovedQi: false,
identificationTypeSelected: !config?.attestation?.identificationTypeRequired,
sessionTypeSelected: SessionType.Research
identificationTypeSelected: false,
sessionTypeSelected: false
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/ui-client/src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,11 @@ button.concept-search-roots-dropdown-toggle.dropdown-toggle.btn.btn-secondary:ho
margin-left: 4px;
font-size: 2rem;
}
.attestation-confirmation-settings,
.attestation-confirmation-footer {
text-align: center;
}
.attestation-confirmation-settings button,
.attestation-confirmation-footer button {
font-size: 1.4rem;
}
Expand Down

0 comments on commit d7d1f4e

Please sign in to comment.