From 19726560ba707a7fdbebe6db95b96c93380348c6 Mon Sep 17 00:00:00 2001 From: diminator Date: Wed, 2 Sep 2015 14:39:32 +0200 Subject: [PATCH] bitbucket test --- ...contract.js => form_contract_agreement.js} | 28 +++++++++---------- .../ikonotv/ikonotv_request_loan.js | 4 +-- js/constants/api_urls.js | 1 + 3 files changed, 16 insertions(+), 17 deletions(-) rename js/components/ascribe_forms/{form_contract.js => form_contract_agreement.js} (85%) diff --git a/js/components/ascribe_forms/form_contract.js b/js/components/ascribe_forms/form_contract_agreement.js similarity index 85% rename from js/components/ascribe_forms/form_contract.js rename to js/components/ascribe_forms/form_contract_agreement.js index 4c51e7a3..747bdfa4 100644 --- a/js/components/ascribe_forms/form_contract.js +++ b/js/components/ascribe_forms/form_contract_agreement.js @@ -19,7 +19,7 @@ import { getLangText } from '../../utils/lang_utils'; import { mergeOptions } from '../../utils/general_utils'; -let ContractForm = React.createClass({ +let ContractAgreementForm = React.createClass({ propTypes: { handleSuccess: React.PropTypes.func }, @@ -55,8 +55,13 @@ let ContractForm = React.createClass({ GlobalNotificationActions.appendGlobalNotification(notification); }, + getFormData(){ + return {'appendix': {'default': this.refs.form.refs.appendix.value}} + }, + getContracts() { - if (this.state.contractList && this.state.contractList.length > 0) { + if (this.state.contractList && this.state.contractList.count > 0) { + let contractList = this.state.contractList.results; return ( {getLangText('Learn more')} }> - - + ); } }); diff --git a/js/constants/api_urls.js b/js/constants/api_urls.js index b056ee03..6e43b8ef 100644 --- a/js/constants/api_urls.js +++ b/js/constants/api_urls.js @@ -27,6 +27,7 @@ let ApiUrls = { 'note_private_piece': AppConstants.apiEndpoint + 'note/private/pieces/', 'note_public_edition': AppConstants.apiEndpoint + 'note/public/editions/', 'note_public_piece': AppConstants.apiEndpoint + 'note/public/pieces/', + 'ownership_contract_agreements': AppConstants.apiEndpoint + 'ownership/contract_agreements/', 'ownership_consigns': AppConstants.apiEndpoint + 'ownership/consigns/', 'ownership_consigns_confirm': AppConstants.apiEndpoint + 'ownership/consigns/confirm/', 'ownership_consigns_deny': AppConstants.apiEndpoint + 'ownership/consigns/deny/',