From 74faa286f1a8a1734b8724d0bb94805326d8db68 Mon Sep 17 00:00:00 2001 From: ddejongh Date: Tue, 2 Jun 2015 14:00:05 +0200 Subject: [PATCH] loan/share forms multiedition --- js/components/ascribe_forms/form_loan.js | 15 +++---- .../ascribe_forms/form_share_email.js | 7 +-- js/components/ascribe_modal/modal_transfer.js | 43 ------------------- js/constants/application_constants.js | 4 +- 4 files changed, 11 insertions(+), 58 deletions(-) delete mode 100644 js/components/ascribe_modal/modal_transfer.js diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js index 9a1cce27..90232bd8 100644 --- a/js/components/ascribe_forms/form_loan.js +++ b/js/components/ascribe_forms/form_loan.js @@ -25,7 +25,7 @@ let LoanForm = React.createClass({ }, getFormData() { return { - bitcoin_id: this.props.edition.bitcoin_id, + bitcoin_id: this.getBitcoinIds().join(), loanee: this.refs.loanee.state.value, gallery_name: this.refs.gallery_name.state.value, startdate: this.refs.startdate.state.value, @@ -59,15 +59,17 @@ let LoanForm = React.createClass({ }); }, renderForm() { - let title = this.props.edition.title; + let title = this.getTitlesString().join(""); let username = this.props.currentUser.username; let message = `Hi, -I loan \" ${title} \" to you. +I loan : +${title}to you. Truly yours, ${username}`; + let contract = ; if (this.state.loaneeHasContract){ let label =
@@ -82,13 +84,6 @@ ${username}`; label={label} /> } - // return (
diff --git a/js/components/ascribe_forms/form_share_email.js b/js/components/ascribe_forms/form_share_email.js index ea87b4cf..cbcfc7a1 100644 --- a/js/components/ascribe_forms/form_share_email.js +++ b/js/components/ascribe_forms/form_share_email.js @@ -16,18 +16,19 @@ let ShareForm = React.createClass({ }, getFormData() { return { - bitcoin_id: this.props.edition.bitcoin_id, + bitcoin_id: this.getBitcoinIds().join(), share_emails: this.refs.share_emails.state.value, share_message: this.refs.share_message.state.value } }, renderForm() { - let title = this.props.edition.title; + let title = this.getTitlesString().join(""); let username = this.props.currentUser.username; let message = `Hi, -I am sharing \" ${title} \" with you. +I am sharing : +${title}with you. Truly yours, ${username}`; diff --git a/js/components/ascribe_modal/modal_transfer.js b/js/components/ascribe_modal/modal_transfer.js deleted file mode 100644 index 12b40524..00000000 --- a/js/components/ascribe_modal/modal_transfer.js +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import Modal from 'react-bootstrap/lib/Modal'; -import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; -import ModalTrigger from 'react-bootstrap/lib/ModalTrigger'; -import Tooltip from 'react-bootstrap/lib/Tooltip'; - -import TransferForm from '../ascribe_forms/form_transfer' -import ModalMixin from '../../mixins/modal_mixin' - -let TransferModalButton = React.createClass({ - render() { - return ( - Transfer the ownership of the artwork}> - }> -
- TRANSFER -
-
-
- ) - } -}); - -let TransferModal = React.createClass({ - mixins : [ModalMixin], - - render() { - return ( - -
- -
-
- ) - } -}); - - -export default TransferModalButton; diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js index 9c20a7ba..17a6d7df 100644 --- a/js/constants/application_constants.js +++ b/js/constants/application_constants.js @@ -1,6 +1,6 @@ let constants = { - 'baseUrl': 'http://localhost:8000/api/', - //'baseUrl': 'http://staging.ascribe.io/api/', + //'baseUrl': 'http://localhost:8000/api/', + 'baseUrl': 'http://staging.ascribe.io/api/', 'debugCredentialBase64': 'ZGltaUBtYWlsaW5hdG9yLmNvbTowMDAwMDAwMDAw', // dimi@mailinator:0000000000 'aclList': ['edit', 'consign', 'transfer', 'loan', 'share', 'download', 'view', 'delete', 'del_from_collection', 'add_to_collection'] };