'use strict'; import React from 'react'; import Form from '../ascribe_forms/form'; import Property from '../ascribe_forms/property'; import InputCheckbox from '../ascribe_forms/input_checkbox'; import GlobalNotificationModel from '../../models/global_notification_model'; import GlobalNotificationActions from '../../actions/global_notification_actions'; import ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader'; import AppConstants from '../../constants/application_constants'; import ApiUrls from '../../constants/api_urls'; 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 }); }, handleCreateSuccess(response) { let notification = new GlobalNotificationModel(getLangText('Contract %s successfully created', response.name), 'success', 5000); GlobalNotificationActions.appendGlobalNotification(notification); }, render() { return (
{getLangText('Create new contract')} } spinner={ }> {' ' + getLangText('I agree to the Terms of Service') + ' '} ( {getLangText('read')} )
); } }); export default CreateContractForm;