diff --git a/js/components/ascribe_forms/form_create_contract.js b/js/components/ascribe_forms/form_create_contract.js index 9cf97db7..d0e160a3 100644 --- a/js/components/ascribe_forms/form_create_contract.js +++ b/js/components/ascribe_forms/form_create_contract.js @@ -11,38 +11,23 @@ import GlobalNotificationActions from '../../actions/global_notification_actions import ContractListActions from '../../actions/contract_list_actions'; -import ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader'; - import AppConstants from '../../constants/application_constants'; import ApiUrls from '../../constants/api_urls'; - +import InputFineUploader from './input_fineuploader'; import { getLangText } from '../../utils/lang_utils'; -import { getCookie } from '../../utils/fetch_api_utils'; import { formSubmissionValidation } from '../ascribe_uploader/react_s3_fine_uploader_utils'; + let CreateContractForm = React.createClass({ getInitialState() { return { - contractKey: null, isUploadReady: false }; }, - getFormData(){ - return { - blob: this.state.contractKey - }; - }, - - submitKey(key) { - this.setState({ - contractKey: key - }); - }, - setIsUploadReady(isReady) { this.setState({ isUploadReady: isReady @@ -62,7 +47,6 @@ let CreateContractForm = React.createClass({
}> - + isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile} /> - Make contract public (this will replace the current public contract) + {getLangText('Make contract public (this will replace the current public contract')} diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js index 8f2666c0..dab0b251 100644 --- a/js/components/ascribe_forms/form_register_piece.js +++ b/js/components/ascribe_forms/form_register_piece.js @@ -10,10 +10,11 @@ import Property from './property'; import InputFineUploader from './input_fineuploader'; import ApiUrls from '../../constants/api_urls'; +import AppConstants from '../../constants/application_constants'; import { getLangText } from '../../utils/lang_utils'; import { mergeOptions } from '../../utils/general_utils'; -import { isReadyForFormSubmission } from '../ascribe_uploader/react_s3_fine_uploader_utils'; +import { formSubmissionValidation } from '../ascribe_uploader/react_s3_fine_uploader_utils'; let RegisterPieceForm = React.createClass({ @@ -99,8 +100,19 @@ let RegisterPieceForm = React.createClass({ name="digital_work_key" ignoreFocus={true}>