Commit a727ba65 authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas

fix(submission form): identify optional fields

parent e299ead9
......@@ -119,6 +119,7 @@ const AuthorInput = props => {
'name',
'value',
'placeholder',
'required',
])
const handleAddAffiliations = () => {
......@@ -210,7 +211,7 @@ const AuthorInput = props => {
</Wrapper>
<AffiliationsWrapper>
<Label>Affiliations</Label>
<Label>Affiliations *</Label>
{affiliations &&
affiliations.length > 0 &&
affiliations.map((item, i) => (
......@@ -247,6 +248,7 @@ const AuthorInput = props => {
label="Email address"
name={emailName}
placeholder="Please type in the email"
required
{...autoCompleteProps}
value={get(values, emailName)}
/>
......
......@@ -169,8 +169,10 @@ const Image = props => {
<Wrapper>
{props.label && (
<>
<Label>{`${props.label}${props.required && ' *'}`}</Label>
{error && <Error>{error}</Error>}
<Label>
{props.label} {props.required && ' *'}
</Label>
{touched && <Error>{error}</Error>}
</>
)}
<StyledDropArea {...props} setInternalError={setInternalError} />
......
......@@ -111,6 +111,7 @@ const InitialSubmission = props => {
label="Authors"
name="authors"
placeholder="Please type the author's name"
required
{...props}
/>
......@@ -183,7 +184,7 @@ const InitialSubmission = props => {
label="Methods"
link
name="methods"
placeholder="Describe the methods"
placeholder="Describe the methods (optional)"
subscript
superscript
table
......@@ -201,7 +202,7 @@ const InitialSubmission = props => {
label="Reagents"
link
name="reagents"
placeholder="Provide the reagents used"
placeholder="Provide the reagents used (optional)"
subscript
superscript
table
......@@ -285,6 +286,7 @@ const InitialSubmission = props => {
error={get(errors, 'acknowledgements')}
label="Acknowledgements"
name="acknowledgements"
placeholder="Enter acknowledgements (optional)"
value={get(values, 'acknowledgements')}
{...props}
/>
......@@ -304,7 +306,7 @@ const InitialSubmission = props => {
)
}
onSuggestionSelected={onSuggestionSelected}
placeholder="Enter your PI’s registered WormBase Laboratory"
placeholder="Enter your PI’s registered WormBase Laboratory (optional)"
value={get(values, 'laboratory.name')}
{...props}
/>
......@@ -335,7 +337,7 @@ const InitialSubmission = props => {
)
}
onSuggestionSelected={onSuggestionSelected}
placeholder="Please suggest a reviewer"
placeholder="Please suggest a reviewer (optional)"
value={get(values, 'suggestedReviewer.name')}
{...props}
/>
......@@ -359,6 +361,7 @@ const InitialSubmission = props => {
key={`comments-${props.readOnly}`}
label="Comments to the editor"
name="comments"
placeholder="Enter comments (optional)"
value={get(values, 'comments')}
{...props}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment