mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
fix lock functionality bug
This commit is contained in:
parent
12de8139c2
commit
5d4762f942
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -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}>
|
||||
<input
|
||||
value={this.props.email}
|
||||
type="email"
|
||||
@ -157,7 +158,8 @@ let LoanForm = React.createClass({
|
||||
<Property
|
||||
name='gallery_name'
|
||||
label={getLangText('Gallery/exhibition (optional)')}
|
||||
editable={!this.props.gallery}>
|
||||
editable={!this.props.gallery}
|
||||
overrideForm={!this.props.gallery}>
|
||||
<input
|
||||
value={this.props.gallery}
|
||||
type="text"
|
||||
|
@ -11,7 +11,14 @@ import { mergeOptions } from '../../utils/general_utils';
|
||||
let Property = React.createClass({
|
||||
propTypes: {
|
||||
hidden: React.PropTypes.bool,
|
||||
|
||||
editable: React.PropTypes.bool,
|
||||
|
||||
// If we want Form to have a different value for disabled as Property has one for
|
||||
// editable, we need to set overrideForm to true, as it will then override Form's
|
||||
// disabled value for individual Properties
|
||||
overrideForm: React.PropTypes.bool,
|
||||
|
||||
tooltip: React.PropTypes.element,
|
||||
label: React.PropTypes.string,
|
||||
value: React.PropTypes.oneOfType([
|
||||
|
@ -172,7 +172,7 @@ let SlidesContainer = React.createClass({
|
||||
let breadcrumbs = [];
|
||||
|
||||
ReactAddons.Children.map(this.props.children, (child, i) => {
|
||||
if(i >= this.state.startFrom) {
|
||||
if(i >= this.state.startFrom && child.props['data-slide-title']) {
|
||||
breadcrumbs.push(child.props['data-slide-title']);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user