diff --git a/js/components/ascribe_forms/form_contract_agreement.js b/js/components/ascribe_forms/form_contract_agreement.js
index 0c20383c..887b99db 100644
--- a/js/components/ascribe_forms/form_contract_agreement.js
+++ b/js/components/ascribe_forms/form_contract_agreement.js
@@ -35,7 +35,7 @@ let ContractAgreementForm = React.createClass({
componentDidMount() {
ContractListStore.listen(this.onChange);
- ContractListActions.fetchContractList({is_active: 'True'});
+ ContractListActions.fetchContractList({is_active: true});
},
componentWillUnmount() {
diff --git a/js/components/ascribe_forms/form_create_contract.js b/js/components/ascribe_forms/form_create_contract.js
index 9cf97db7..b275df03 100644
--- a/js/components/ascribe_forms/form_create_contract.js
+++ b/js/components/ascribe_forms/form_create_contract.js
@@ -50,7 +50,7 @@ let CreateContractForm = React.createClass({
},
handleCreateSuccess(response) {
- ContractListActions.fetchContractList({is_active: 'True'});
+ ContractListActions.fetchContractList({is_active: true});
let notification = new GlobalNotificationModel(getLangText('Contract %s successfully created', response.name), 'success', 5000);
GlobalNotificationActions.appendGlobalNotification(notification);
this.refs.form.reset();
diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js
index 29d0ecd4..6de68142 100644
--- a/js/components/ascribe_forms/form_loan.js
+++ b/js/components/ascribe_forms/form_loan.js
@@ -17,6 +17,7 @@ import ContractAgreementListActions from '../../actions/contract_agreement_list_
import AppConstants from '../../constants/application_constants';
+import { mergeOptions } from '../../utils/general_utils';
import { getLangText } from '../../utils/lang_utils';
@@ -67,7 +68,10 @@ let LoanForm = React.createClass({
},
getFormData(){
- return this.props.id;
+ return mergeOptions(
+ this.props.id,
+ this.getContractAgreementId()
+ );
},
handleOnChange(event) {
@@ -79,6 +83,13 @@ let LoanForm = React.createClass({
}
},
+ getContractAgreementId() {
+ if (this.state.contractAgreementList && this.state.contractAgreementList.length > 0) {
+ return {'contract_agreement_id': this.state.contractAgreementList[0].id};
+ }
+ return null;
+ },
+
getContractCheckbox() {
if(this.state.contractAgreementList && this.state.contractAgreementList.length > 0) {
// we need to define a key on the InputCheckboxes as otherwise
@@ -97,7 +108,7 @@ let LoanForm = React.createClass({
{getLangText('I agree to the')}
- {getLangText('terms of')} {contract.issuer}
+ {getLangText('terms of ')} {contract.issuer}
diff --git a/js/components/ascribe_settings/contract_settings.js b/js/components/ascribe_settings/contract_settings.js
index 278c4c1b..b79f77f1 100644
--- a/js/components/ascribe_settings/contract_settings.js
+++ b/js/components/ascribe_settings/contract_settings.js
@@ -26,7 +26,7 @@ let ContractSettings = React.createClass({
componentDidMount() {
ContractListStore.listen(this.onChange);
- ContractListActions.fetchContractList({is_active: 'True'});
+ ContractListActions.fetchContractList({is_active: true});
},
componentWillUnmount() {
@@ -42,7 +42,7 @@ let ContractSettings = React.createClass({
contract.is_public = true;
ContractListActions.changeContract(contract)
.then(() => {
- ContractListActions.fetchContractList({is_active: 'True'});
+ ContractListActions.fetchContractList({is_active: true});
let notification = getLangText('Contract %s is now public', contract.name);
notification = new GlobalNotificationModel(notification, 'success', 4000);
GlobalNotificationActions.appendGlobalNotification(notification);
@@ -58,7 +58,7 @@ let ContractSettings = React.createClass({
return () => {
ContractListActions.removeContract(contract.id)
.then((response) => {
- ContractListActions.fetchContractList({is_active: 'True'});
+ ContractListActions.fetchContractList({is_active: true});
let notification = new GlobalNotificationModel(response.notification, 'success', 4000);
GlobalNotificationActions.appendGlobalNotification(notification);
})
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js
index 41b47a82..4b7f3dbc 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js
@@ -50,21 +50,7 @@ let IkonotvSubmitButton = React.createClass({
enddate={enddate}
gallery="IkonoTV archive"
showPersonalMessage={false}
- handleSuccess={this.props.handleSuccess}>
-
-
-
- {' ' + getLangText('I agree to the Terms of Service of IkonoTV Archive') + ' '}
- (
- {getLangText('read')}
- )
-
-
-
-
+ handleSuccess={this.props.handleSuccess} />
);