Commit 671ad5c3 authored by Asaad Mahmood's avatar Asaad Mahmood Committed by Harrison Healey

Fixing errors in system console (#3484)

parent 4f3a73ae
......@@ -114,9 +114,11 @@ export default class AdminSettings extends React.Component {
role='form'
>
{this.renderSettings()}
<div className='form-group'>
<FormError error={this.state.serverError}/>
</div>
<div className='form-group'>
<div className='col-sm-12'>
<FormError error={this.state.serverError}/>
<SaveButton
saving={this.state.saving}
disabled={!this.state.saveNeeded || (this.canSave && !this.canSave())}
......
......@@ -54,10 +54,7 @@ export default class MultiSelectSetting extends React.Component {
onChange={this.handleChange}
value={this.props.selected}
/>
<FormError
noMargin={true}
error={this.state.error}
/>
<FormError error={this.state.error}/>
</Setting>
);
}
......
......@@ -8,7 +8,6 @@ export default class FormError extends React.Component {
// accepts either a single error or an array of errors
return {
error: React.PropTypes.node,
noMargin: React.PropTypes.node,
errors: React.PropTypes.arrayOf(React.PropTypes.node)
};
}
......@@ -27,7 +26,6 @@ export default class FormError extends React.Component {
// look for the first truthy error to display
let message = this.props.error;
const noMargin = this.props.noMargin;
if (!message) {
for (const error of this.props.errors) {
......@@ -41,18 +39,8 @@ export default class FormError extends React.Component {
return null;
}
if (noMargin) {
return (
<div className='has-error'>
<label className='control-label'>
{message}
</label>
</div>
);
}
return (
<div className='form-group has-error'>
<div className='col-sm-12 has-error'>
<label className='control-label'>
{message}
</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment