From 30d57a943f0416139bd4a76ca8bfe82ab8beabba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 21 Aug 2015 11:01:13 +0200 Subject: [PATCH] fix lock form --- .../ascribe_detail/further_details_fileuploader.js | 2 +- js/components/ascribe_forms/form_loan.js | 4 ++-- .../ascribe_forms/cyland_additional_data_form.js | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/components/ascribe_detail/further_details_fileuploader.js b/js/components/ascribe_detail/further_details_fileuploader.js index 7c5525fd..2c9f2854 100644 --- a/js/components/ascribe_detail/further_details_fileuploader.js +++ b/js/components/ascribe_detail/further_details_fileuploader.js @@ -33,7 +33,7 @@ let FurtherDetailsFileuploader = React.createClass({ // // 1. there is no other_data => do not show the fileuploader at all // 2. there is other_data, but user has no edit rights => show fileuploader but without action buttons - // 3. both other_data and editable are defined or true => show fileuploade with all action buttons + // 3. both other_data and editable are defined or true => show fileuploader with all action buttons if (!this.props.editable && !this.props.otherData){ return null; } diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js index 201ba174..1beac5f9 100644 --- a/js/components/ascribe_forms/form_loan.js +++ b/js/components/ascribe_forms/form_loan.js @@ -148,7 +148,7 @@ let LoanForm = React.createClass({ label={getLangText('Loanee Email')} onBlur={this.handleOnBlur} editable={!this.props.email} - overrideForm={!this.props.email}> + overrideForm={this.props.email}> + overrideForm={this.props.gallery}> + editable={!this.props.disabled}> + editable={!this.props.disabled}> @@ -115,7 +115,7 @@ let CylandAdditionalDataForm = React.createClass({ submitKey={this.submitKey} setIsUploadReady={this.setIsUploadReady} isReadyForFormSubmission={this.isReadyForFormSubmission} - editable={true} + editable={!this.props.disabled} pieceId={this.props.piece.id} otherData={this.props.piece.other_data} multiple={true}/>