diff --git a/packages/component-review/src/components/metadata/ReviewMetadata.js b/packages/component-review/src/components/metadata/ReviewMetadata.js index d50225abaa5bacb811346eb7da59bf87ffebfc6a..2d7c8023d1fef2cb90bedc9e5a230141479cdf96 100644 --- a/packages/component-review/src/components/metadata/ReviewMetadata.js +++ b/packages/component-review/src/components/metadata/ReviewMetadata.js @@ -10,7 +10,9 @@ const ReviewMetadata = ({ version, handlingEditors }) => ( <tbody> <tr> <th className={classes.heading}>peer review:</th> - <td>{version.declarations.openPeerReview ? 'open' : 'closed'}</td> + <td> + {version.declarations.openPeerReview === 'yes' ? 'open' : 'closed'} + </td> </tr> {!!handlingEditors && ( diff --git a/packages/component-submit/src/components/Declarations.js b/packages/component-submit/src/components/Declarations.js index d7d3e967ff9a1d719fffb1c713941250d53383c1..21b9585a7ed7b1a4105cbc0a648d84a664c2085b 100644 --- a/packages/component-submit/src/components/Declarations.js +++ b/packages/component-submit/src/components/Declarations.js @@ -1,12 +1,14 @@ import React from 'react' import classnames from 'classnames' import { FormSection } from 'redux-form' -import { ValidatedField, YesOrNo } from '@pubsweet/ui' +import { ValidatedField, RadioGroup } from '@pubsweet/ui' import { withJournal } from 'xpub-journal' import { required } from 'xpub-validators' import classes from './Declarations.local.scss' -const DeclarationInput = input => <YesOrNo inline {...input} /> +const DeclarationInput = options => input => ( + <RadioGroup inline options={options} {...input} /> +) const Declarations = ({ journal, readonly }) => ( <FormSection name="declarations"> @@ -22,7 +24,7 @@ const Declarations = ({ journal, readonly }) => ( > <div className={classes.legend}>{question.legend}</div> <ValidatedField - component={DeclarationInput} + component={DeclarationInput(question.options)} name={question.id} readonly={readonly} required diff --git a/packages/component-submit/src/components/Notes.js b/packages/component-submit/src/components/Notes.js index 431aab2667d00156c9f98cff5416b44a878e11ec..5a19bd621074973db9946028fb6b9f0b509a51a1 100644 --- a/packages/component-submit/src/components/Notes.js +++ b/packages/component-submit/src/components/Notes.js @@ -16,7 +16,7 @@ const FundingInput = input => ( const InstructionsInput = input => ( <NoteEditor placeholder="Enter instructions for the editor…" - title="Special instructions (confidential)" + title="Special instructions (confidential, to Editors only)" {...input} /> ) diff --git a/packages/xpub-collabra/app/config/journal/declarations.js b/packages/xpub-collabra/app/config/journal/declarations.js index 012e4d46c2bfe3b20da969a9277a391d61c18094..d870cf6b67b87fba12c170af534ece0bf3793351 100644 --- a/packages/xpub-collabra/app/config/journal/declarations.js +++ b/packages/xpub-collabra/app/config/journal/declarations.js @@ -2,27 +2,87 @@ export default { questions: [ { id: 'openData', - legend: 'Data is open', + legend: 'Data is open ?', + options: [ + { + label: 'Yes', + value: 'yes', + }, + { + label: 'No/Not Applicable', + value: 'no', + }, + ], }, { id: 'previouslySubmitted', - legend: 'Previously submitted', + legend: 'Previously submitted ?', + options: [ + { + label: 'Yes', + value: 'yes', + }, + { + label: 'No', + value: 'no', + }, + ], }, { id: 'openPeerReview', - legend: 'Open peer review', + legend: 'Open peer review ?', + options: [ + { + label: 'Yes', + value: 'yes', + }, + { + label: 'No', + value: 'no', + }, + ], }, { id: 'streamlinedReview', - legend: 'Streamlined review', + legend: 'Streamlined review ?', + options: [ + { + label: 'Yes', + value: 'yes', + }, + { + label: 'No', + value: 'no', + }, + ], }, { id: 'researchNexus', - legend: 'Submitted as part of the research nexus?', + legend: 'Submitted as part of the research nexus ?', + options: [ + { + label: 'Yes', + value: 'yes', + }, + { + label: 'No', + value: 'no', + }, + ], }, { id: 'preregistered', - legend: 'Pre-registered?', + legend: 'Pre-registered ?', + options: [ + { + label: 'Yes', + value: 'yes', + }, + { + label: 'No', + value: 'no', + }, + ], }, ], }