Commit 8a204f82 authored by PDuarte's avatar PDuarte

adding external url

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