diff --git a/js/components/ascribe_forms/form_piece_extradata.js b/js/components/ascribe_forms/form_piece_extradata.js index 282afcdf..41828120 100644 --- a/js/components/ascribe_forms/form_piece_extradata.js +++ b/js/components/ascribe_forms/form_piece_extradata.js @@ -2,34 +2,39 @@ import React from 'react'; +import fetch from '../../utils/fetch'; + import apiUrls from '../../constants/api_urls'; import FormMixin from '../../mixins/form_mixin'; import InputTextAreaToggable from './input_textarea_toggable'; -let PersonalNoteForm = React.createClass({ +let PieceExtraDataForm = React.createClass({ mixins: [FormMixin], url() { - return apiUrls.note_notes; + return fetch.prepareUrl(apiUrls.piece_extradata, {piece_id: this.props.editions[0].bitcoin_id}); }, getFormData() { + let extradata = {}; + extradata[this.props.name] = this.refs[this.props.name].state.value; return { bitcoin_id: this.getBitcoinIds().join(), - note: this.refs.personalNote.state.value + extradata: extradata }; }, renderForm() { return ( -