Skip to content

Commit

Permalink
source and source link fields in chartblock
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-macaneata committed Jan 19, 2020
1 parent 19cde21 commit ed1e1a6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/ChartBlock/Edit.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Loadable from 'react-loadable';
import { Field } from '@plone/volto/components'; // EditBlock

import { Segment } from 'semantic-ui-react'; // , Dropdown
import 'react-chart-editor/lib/react-chart-editor.css';
Expand Down Expand Up @@ -111,6 +112,32 @@ class Edit extends Component {
}
value={this.props.data?.url}
/>
<Field
title="Source"
id="chart-source"
type="text"
value={this.props.data.chart_source || ''}
required={false}
onChange={(e, d) =>
this.props.onChangeBlock(this.props.block, {
...this.props.data,
chart_source: d,
})
}
/>
<Field
title="Source Link"
id="chart-source-link"
type="text"
value={this.props.data.chart_source_link || ''}
required={false}
onChange={(e, d) =>
this.props.onChangeBlock(this.props.block, {
...this.props.data,
chart_source_link: d,
})
}
/>
</Segment>
</Segment.Group>
</SidebarPortal>
Expand Down

0 comments on commit ed1e1a6

Please sign in to comment.