diff --git a/js/components/ascribe_forms/form_contract_agreement.js b/js/components/ascribe_forms/form_contract_agreement.js index 9aad8827..0c20383c 100644 --- a/js/components/ascribe_forms/form_contract_agreement.js +++ b/js/components/ascribe_forms/form_contract_agreement.js @@ -54,6 +54,7 @@ let ContractAgreementForm = React.createClass({ let notification = 'Contract agreement send'; notification = new GlobalNotificationModel(notification, 'success', 10000); GlobalNotificationActions.appendGlobalNotification(notification); + this.refs.form.reset(); }, getFormData(){ diff --git a/js/components/ascribe_forms/form_create_contract.js b/js/components/ascribe_forms/form_create_contract.js index ee26adfc..9cf97db7 100644 --- a/js/components/ascribe_forms/form_create_contract.js +++ b/js/components/ascribe_forms/form_create_contract.js @@ -53,15 +53,14 @@ let CreateContractForm = React.createClass({ ContractListActions.fetchContractList({is_active: 'True'}); let notification = new GlobalNotificationModel(getLangText('Contract %s successfully created', response.name), 'success', 5000); GlobalNotificationActions.appendGlobalNotification(notification); - // - //// also refresh contract lists for the rest of the contract settings page - //ContractListActions.fetchContractList(); + this.refs.form.reset(); }, render() { return (
diff --git a/js/components/ascribe_forms/property.js b/js/components/ascribe_forms/property.js index cfc4c4d9..90aa0490 100644 --- a/js/components/ascribe_forms/property.js +++ b/js/components/ascribe_forms/property.js @@ -90,8 +90,10 @@ let Property = React.createClass({ // maybe do reset by reload instead of front end state? this.setState({value: this.state.initialValue}); - // resets the value of a custom react component input - this.refs.input.state.value = this.state.initialValue; + if (this.refs.input.state && this.refs.input.state.value) { + // resets the value of a custom react component input + this.refs.input.state.value = this.state.initialValue; + } // resets the value of a plain HTML5 input this.refs.input.getDOMNode().value = this.state.initialValue; diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js index e7e2d851..6a63657c 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js @@ -53,7 +53,7 @@ let IkonotvContractNotifications = React.createClass({ this.setState(state); }, - displayContract(){ + getContract(){ let notifications = this.state.contractAgreementListNotifications[0]; let blob = notifications.contract_agreement.contract.blob; if (blob.mime === 'pdf') { @@ -62,7 +62,7 @@ let IkonotvContractNotifications = React.createClass({
- + Download PDF version @@ -74,7 +74,7 @@ let IkonotvContractNotifications = React.createClass({ } return (
- {this.displayContract()} + {this.getContract()}
-

{getLangText('Appendix')}

-
-                                {contractAgreement.appendix.default}
-                            
+ {this.getAppendix}

{getLangText('Are you a member of any copyright societies?')}

ARS, DACS, Bildkunst, Pictoright, SODRAC, Copyright Agency/Viscopy, SAVA, Bildrecht GmbH, diff --git a/js/utils/requests.js b/js/utils/requests.js index b36351a2..fd676896 100644 --- a/js/utils/requests.js +++ b/js/utils/requests.js @@ -118,9 +118,7 @@ class Requests { merged.method = verb; return fetch(url, merged) .then(this.unpackResponse) - .catch( () => { - this.handleError(); - }); + .catch(this.handleError); } get(url, params) {