Skip to content
Snippets Groups Projects
Commit b29029fd authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

Demo preps

parent 5140067b
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
flex-direction: row;
justify-content: space-between;
margin: 0 40px 70px 40px;
min-width: 400px;
min-width: 500px;
}
.separator {
......
......@@ -2,7 +2,7 @@ module.exports = {
client: {
components: [() => require('./components')],
reducers: {
conversion: () => require('./redux/conversion').default,
wizardConversion: () => require('./redux/conversion').default,
authors: () => require('./redux/authors').default,
},
},
......
import React from 'react'
const Logo = ({ srcUrl }) => (
<img alt="Hindawi" height="36" src={srcUrl} title="Hindawi" />
)
export default Logo
import React from 'react'
import Logo from '../Logo'
export default {
issn: '2474-7394',
name: 'Hindawi Faraday',
name: <Logo srcUrl="/assets/hindawi-logo.png" />,
logo: '/assets/hindawi-logo.png',
}
......@@ -15,7 +15,7 @@ import { declarations } from './'
import issueTypes from './issues-types'
import manuscriptTypes from './manuscript-types'
import { requiredBasedOnType } from './wizard-validators'
import { requiredBasedOnType, parseAbstract } from './wizard-validators'
const min3Chars = minChars(3)
const declarationsMinSize = minSize(declarations.options.length)
......@@ -128,7 +128,7 @@ export default {
renderComponent: AbstractEditor,
title: 'Abstract',
placeholder: 'Write an abstract',
validate: [requiredBasedOnType],
validate: [requiredBasedOnType, parseAbstract],
},
{
fieldId: 'spacing-abstract',
......@@ -165,16 +165,31 @@ export default {
label: 'Files upload',
title: 'Manuscript Files Upload',
children: [
{
fieldId: 'label-manuscript',
renderComponent: Label,
label: 'Main Manuscript',
},
{
fieldId: 'files.manuscripts',
label: 'Main Manuscript',
renderComponent: Supplementary,
},
{
fieldId: 'label-supplementary',
renderComponent: Label,
label: 'Supplemental Files',
},
{
fieldId: 'files.supplementary',
label: 'Supplemental Files',
renderComponent: Supplementary,
},
{
fieldId: 'label-cover',
renderComponent: Label,
label: 'Cover Letter',
},
{
fieldId: 'files.coverLetter',
label: 'Cover Letter',
......
......@@ -15,3 +15,10 @@ export const requiredBasedOnType = (value, formValues) => {
}
return undefined
}
export const parseAbstract = value => {
if (value && value.replace('<p></p>', '').replace('<h1></h1>', '')) {
return undefined
}
return 'Required'
}
......@@ -2,6 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title> Faraday </title>
</head>
<body>
<div id="root"></div>
......
......@@ -13,10 +13,7 @@ import {
} from 'pubsweet-component-xpub-authentication/src/components'
import DashboardPage from 'pubsweet-component-xpub-dashboard/src/components/DashboardPage'
import { WizardPage } from 'pubsweet-component-wizard/src/components'
// import { Wizard } from './component-wizard'
import WizardPage from 'pubsweet-component-wizard/src/components/WizardPage'
const Routes = () => (
<App>
......
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