Commit 8a204f82 authored by PDuarte's avatar PDuarte

adding external url

parent 0e3e8103
...@@ -30,6 +30,7 @@ const Tables = () => { ...@@ -30,6 +30,7 @@ const Tables = () => {
parentid: values.parentid, parentid: values.parentid,
parenttype: values.parenttype, parenttype: values.parenttype,
external_id: values.external_id, external_id: values.external_id,
external_url: values.external_url,
textual: values.textual, textual: values.textual,
availability: values.availability, availability: values.availability,
genres: values.genres, genres: values.genres,
...@@ -64,6 +65,7 @@ const Tables = () => { ...@@ -64,6 +65,7 @@ const Tables = () => {
parentid: null, parentid: null,
parenttype: null, parenttype: null,
external_id: '', external_id: '',
external_url: '',
textual: [], textual: [],
genres: [], genres: [],
subgenres: [], subgenres: [],
......
...@@ -94,7 +94,8 @@ const handleError = (text) => { ...@@ -94,7 +94,8 @@ const handleError = (text) => {
title: values.title, title: values.title,
parentid: values.parentid, parentid: values.parentid,
parenttype: values.parenttype, parenttype: values.parenttype,
external_id: values.external_id external_id: values.external_id,
external_url: values.external_url
} }
onSubmitHandler(submitElement, uploadFiles) onSubmitHandler(submitElement, uploadFiles)
...@@ -361,13 +362,27 @@ return ( ...@@ -361,13 +362,27 @@ return (
type='text' type='text'
name='external_id' name='external_id'
id='external_id' id='external_id'
innerRef={register({ required: true })} innerRef={register({ required: false })}
placeholder='external_id' placeholder='external_id'
defaultValue={dataElement && dataElement.external_id} defaultValue={dataElement && dataElement.external_id}
className={classnames({ 'is-invalid': errors['external_id'] })} className={classnames({ 'is-invalid': errors['external_id'] })}
/> />
</FormGroup> </FormGroup>
</Col> </Col>
<Col md='4' sm='12'>
<FormGroup>
<Label for='external_id'>External Url</Label>
<Input
type='text'
name='external_url'
id='external_url'
innerRef={register({ required: false })}
placeholder='external_url'
defaultValue={dataElement && dataElement.external_url}
className={classnames({ 'is-invalid': errors['external_url'] })}
/>
</FormGroup>
</Col>
</Row> </Row>
<Row> <Row>
<Col className='mb-1' md='6' sm='12'> <Col className='mb-1' md='6' sm='12'>
......
...@@ -33,6 +33,7 @@ const ElementEdit = () => { ...@@ -33,6 +33,7 @@ const ElementEdit = () => {
parentid: values.parentid, parentid: values.parentid,
parenttype: values.parenttype, parenttype: values.parenttype,
external_id: values.external_id, external_id: values.external_id,
external_url: values.external_url,
genres: values.genres, genres: values.genres,
subgenres: values.subgenres, subgenres: values.subgenres,
data: uploadFile data: uploadFile
......
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