To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Verified Commit 4965d350 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Fix SelectTextField in studydocuments upload form

Fixes #3
parent 07aafa19
Pipeline #58720 passed with stages
in 10 minutes and 19 seconds
......@@ -3263,23 +3263,18 @@
"integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM="
},
"amiv-react-components": {
"version": "git+https://gitlab.ethz.ch/amiv/react-components.git#ec9df25003d4a818fbbd42924df1f484deb90e65",
"from": "git+https://gitlab.ethz.ch/amiv/react-components.git#ec9df25003d4a818fbbd42924df1f484deb90e65",
"version": "git+https://gitlab.ethz.ch/amiv/react-components.git#067d8f155d65b20a1a4c6c72b2972734c1692302",
"from": "git+https://gitlab.ethz.ch/amiv/react-components.git#067d8f155d65b20a1a4c6c72b2972734c1692302",
"requires": {
"@babel/runtime": "^7.8.4",
"@material-ui/core": "^4.9.4",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.44",
"@material-ui/styles": "^4.9.0",
"@reach/router": "^1.3.1",
"@reach/router": "^1.3.3",
"ajv": "^6.12.0",
"animated-scroll-to": "^2.0.5",
"axios": "^0.19.2",
"html-escape": "^2.0.0",
"marked": "^0.8.0",
"prop-types": "^15.7.2",
"react-helmet": "^5.2.1",
"react-intl": "^3.12.0"
"react-helmet": "^5.2.1"
},
"dependencies": {
"@babel/runtime": {
......@@ -3289,6 +3284,17 @@
"requires": {
"regenerator-runtime": "^0.13.2"
}
},
"@reach/router": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/@reach/router/-/router-1.3.3.tgz",
"integrity": "sha512-gOIAiFhWdiVGSVjukKeNKkCRBLmnORoTPyBihI/jLunICPgxdP30DroAvPQuf1eVfQbfGJQDJkwhJXsNPMnVWw==",
"requires": {
"create-react-context": "0.3.0",
"invariant": "^2.2.3",
"prop-types": "^15.6.1",
"react-lifecycles-compat": "^3.0.4"
}
}
}
},
......
......@@ -11,7 +11,7 @@
"@material-ui/styles": "^4.9.0",
"@reach/router": "^1.3.1",
"ajv": "^6.12.0",
"amiv-react-components": "git+https://gitlab.ethz.ch/amiv/react-components.git#ec9df25003d4a818fbbd42924df1f484deb90e65",
"amiv-react-components": "git+https://gitlab.ethz.ch/amiv/react-components.git#067d8f155d65b20a1a4c6c72b2972734c1692302",
"animated-scroll-to": "^2.0.5",
"axios": "^0.19.2",
"debounce": "^1.2.0",
......
......@@ -26,7 +26,13 @@ const StudydocumentFormSelectTextField = ({
}}
value={value || ''}
label={intl.formatMessage({ id: `studydocuments.${name}` })}
options={Object.keys(summary[name] || [])}
createEntryText={intl.formatMessage({
id: 'studydocuments.createNewEntry',
})}
createEntryTextShort={intl.formatMessage({
id: 'studydocuments.createNewEntryLabel',
})}
options={Object.keys(summary[name] || {})}
{...props}
/>
)
......
......@@ -16,7 +16,7 @@ const StudydocumentFormTitleField = ({ value, onChange, ...props }) => {
onChange({
name: 'title',
value: e.target.value,
isValid: true,
isValid: e.target.value.length > 0,
})
}
{...props}
......
......@@ -5,7 +5,7 @@ import { makeStyles, useTheme } from '@material-ui/core/styles'
import { Button } from '@material-ui/core'
import Alert from '@material-ui/lab/Alert'
import { useIntl, FormattedMessage, navigate } from 'gatsby-plugin-intl'
import { ExternalLink, Spinner, SelectTextField } from 'amiv-react-components'
import { ExternalLink, Spinner } from 'amiv-react-components'
import { loadItem } from '../../../store/common/actions'
import { STUDYDOCUMENTS } from '../../../store/studydocuments/constants'
......@@ -15,6 +15,7 @@ import {
patchStudydocumentItem,
} from '../../../store/studydocuments/actions'
import TitleField from './_titleField'
import SelectTextField from './_selectTextField'
import TypeField from './_typeField'
import DepartmentField from './_departmentField'
import CourseYearField from './_courseYearField'
......
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