diff --git a/js/components/ascribe_buttons/acl_button.js b/js/components/ascribe_buttons/acl_button.js index 128ff5fb..084de194 100644 --- a/js/components/ascribe_buttons/acl_button.js +++ b/js/components/ascribe_buttons/acl_button.js @@ -95,11 +95,11 @@ let AclButton = React.createClass({ else if (this.props.action === 'acl_loan_request'){ return { title: getLangText('Loan artwork'), - tooltip: getLangText('Loan your artwork for a limited period of time'), + tooltip: getLangText('Someone requested you to loan your artwork for a limited period of time'), form: ( + url={ApiUrls.ownership_loans_pieces_request_confirm}/> ), handleSuccess: this.showNotification }; diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js index bed5e690..f9b866a3 100644 --- a/js/components/ascribe_forms/form_loan.js +++ b/js/components/ascribe_forms/form_loan.js @@ -200,7 +200,7 @@ let LoanForm = React.createClass({ editable={true} defaultValue={this.props.message} placeholder={getLangText('Enter a message...')} - required="required"/> + required={this.props.showPersonalMessage ? 'required' : ''}/> + handleSuccess={this.props.handleSuccess}/> ); } return ; diff --git a/js/components/ascribe_forms/form_request_action.js b/js/components/ascribe_forms/form_request_action.js index 98a59360..bd76c3b8 100644 --- a/js/components/ascribe_forms/form_request_action.js +++ b/js/components/ascribe_forms/form_request_action.js @@ -45,6 +45,9 @@ let RequestActionForm = React.createClass({ } else if (this.props.requestAction === 'loan' && this.isPiece()){ urls.accept = ApiUrls.ownership_loans_pieces_confirm; urls.deny = ApiUrls.ownership_loans_pieces_deny; + } else if (this.props.requestAction === 'loan_request' && this.isPiece()){ + urls.accept = ApiUrls.ownership_loans_pieces_request_confirm; + urls.deny = ApiUrls.ownership_loans_pieces_request_deny; } return urls; @@ -90,7 +93,7 @@ let RequestActionForm = React.createClass({ @@ -101,7 +104,7 @@ let RequestActionForm = React.createClass({ availableAcls={{'acl_loan_request': true}} action="acl_loan_request" buttonAcceptName="LOAN" - buttonAcceptClassName='inline pull-right' + buttonAcceptClassName='inline pull-right btn-sm ascribe-margin-1px' pieceOrEditions={this.props.pieceOrEditions} currentUser={this.props.currentUser} handleSuccess={this.props.handleSuccess} /> diff --git a/js/constants/api_urls.js b/js/constants/api_urls.js index ac495f43..c9b21907 100644 --- a/js/constants/api_urls.js +++ b/js/constants/api_urls.js @@ -33,6 +33,8 @@ let ApiUrls = { 'ownership_loans_pieces_confirm': AppConstants.apiEndpoint + 'ownership/loans/pieces/confirm/', 'ownership_loans_pieces_deny': AppConstants.apiEndpoint + 'ownership/loans/pieces/deny/', 'ownership_loans_pieces_request': AppConstants.apiEndpoint + 'ownership/loans/pieces/request/', + 'ownership_loans_pieces_request_confirm': AppConstants.apiEndpoint + 'ownership/loans/pieces/request_confirm/', + 'ownership_loans_pieces_request_deny': AppConstants.apiEndpoint + 'ownership/loans/pieces/request_deny/', 'ownership_loans_editions': AppConstants.apiEndpoint + 'ownership/loans/editions/', 'ownership_loans_confirm': AppConstants.apiEndpoint + 'ownership/loans/editions/confirm/', 'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/editions/deny/',