diff --git a/js/components/acl_button.js b/js/components/acl_button.js index 65af1e18..5f2a0708 100644 --- a/js/components/acl_button.js +++ b/js/components/acl_button.js @@ -12,11 +12,8 @@ let AclButton = React.createClass({ action: React.PropTypes.oneOf(AppConstants.aclList).isRequired, availableAcls: React.PropTypes.array.isRequired, editions: React.PropTypes.array.isRequired, - currentUser: React.PropTypes.object - }, - - actionFunction() { - this.props.actionFunction(this.props.action); + currentUser: React.PropTypes.object, + handleSuccess: React.PropTypes.func.isRequired }, actionProperties(){ @@ -58,7 +55,8 @@ let AclButton = React.createClass({ } currentUser={ this.props.currentUser } - edition={ this.props.editions[0] } + editions={ this.props.editions } + handleSuccess={ this.props.handleSuccess } title={ aclProps.title } tooltip={ aclProps.tooltip }> { aclProps.form } diff --git a/js/components/ascribe_forms/form_consign.js b/js/components/ascribe_forms/form_consign.js index 708ab70e..dbb1eee0 100644 --- a/js/components/ascribe_forms/form_consign.js +++ b/js/components/ascribe_forms/form_consign.js @@ -16,19 +16,21 @@ let ConsignForm = React.createClass({ }, getFormData() { return { - bitcoin_id: this.props.edition.bitcoin_id, + bitcoin_id: this.getBitcoinIds().join(), consignee: this.refs.consignee.state.value, consign_message: this.refs.consign_message.state.value, password: this.refs.password.state.value } }, + renderForm() { - let title = this.props.edition.title; + let title = this.getTitlesString().join(""); let username = this.props.currentUser.username; let message = `Hi, -I consign \" ${title} \" to you. +I consign : +${title}to you. Truly yours, ${username}`; diff --git a/js/components/ascribe_forms/form_transfer.js b/js/components/ascribe_forms/form_transfer.js index 28e86db3..c724edd0 100644 --- a/js/components/ascribe_forms/form_transfer.js +++ b/js/components/ascribe_forms/form_transfer.js @@ -18,19 +18,24 @@ let TransferForm = React.createClass({ }, getFormData() { return { - bitcoin_id: this.props.edition.bitcoin_id, + bitcoin_id: this.getBitcoinIds().join(), transferee: this.refs.transferee.state.value, transfer_message: this.refs.transfer_message.state.value, password: this.refs.password.state.value } }, renderForm() { - let message = "Hi,\n" + - "\n" + - "I transfer ownership of \"" + this.props.edition.title + "\" to you.\n" + - "\n" + - "Truly yours,\n" + - this.props.currentUser.username; + let title = this.getTitlesString().join(""); + let username = this.props.currentUser.username; + let message = +`Hi, + +I transfer ownership of : +${title}to you. + +Truly yours, +${username}`; + return (