mirror of
https://github.com/ascribe/onion.git
synced 2024-12-31 17:17:48 +01:00
Fix mistaken check for form buttons
This commit is contained in:
parent
405a46dca3
commit
a85c70798e
@ -205,16 +205,15 @@ let Form = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getButtons() {
|
getButtons() {
|
||||||
if (this.state.submitted){
|
if (this.state.submitted) {
|
||||||
return this.props.spinner;
|
return this.props.spinner;
|
||||||
}
|
}
|
||||||
if ('buttons' in this.props) {
|
if (this.props.buttons !== undefined) {
|
||||||
return this.props.buttons;
|
return this.props.buttons;
|
||||||
}
|
}
|
||||||
let buttons = null;
|
|
||||||
|
|
||||||
if (this.state.edited && !this.props.disabled){
|
if (this.state.edited && !this.props.disabled) {
|
||||||
buttons = (
|
return (
|
||||||
<div className="row" style={{margin: 0}}>
|
<div className="row" style={{margin: 0}}>
|
||||||
<p className="pull-right">
|
<p className="pull-right">
|
||||||
<Button
|
<Button
|
||||||
@ -230,9 +229,9 @@ let Form = React.createClass({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return buttons;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getErrors() {
|
getErrors() {
|
||||||
|
Loading…
Reference in New Issue
Block a user