From 5d4762f9426d74970d481614e64f9e6e5f6fb835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 20 Aug 2015 11:03:00 +0200 Subject: [PATCH] fix lock functionality bug --- js/components/ascribe_forms/form.js | 2 +- js/components/ascribe_forms/form_loan.js | 6 ++++-- js/components/ascribe_forms/property.js | 7 +++++++ js/components/ascribe_slides_container/slides_container.js | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_forms/form.js b/js/components/ascribe_forms/form.js index 8522825c..12e4ebae 100644 --- a/js/components/ascribe_forms/form.js +++ b/js/components/ascribe_forms/form.js @@ -210,7 +210,7 @@ let Form = React.createClass({ // We need this in order to make editable be overridable when setting it directly // on Property - editable: typeof child.props.editable !== 'undefined' ? child.props.editable : !this.props.disabled + editable: child.props.overrideForm ? child.props.editable : !this.props.disabled }); } }); diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js index 3fc6bd6e..201ba174 100644 --- a/js/components/ascribe_forms/form_loan.js +++ b/js/components/ascribe_forms/form_loan.js @@ -147,7 +147,8 @@ let LoanForm = React.createClass({ name='loanee' label={getLangText('Loanee Email')} onBlur={this.handleOnBlur} - editable={!this.props.email}> + editable={!this.props.email} + overrideForm={!this.props.email}> + editable={!this.props.gallery} + overrideForm={!this.props.gallery}> { - if(i >= this.state.startFrom) { + if(i >= this.state.startFrom && child.props['data-slide-title']) { breadcrumbs.push(child.props['data-slide-title']); } });