Fixing errors in system console (#3484)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
b8189369ed
Коммит
068df708c0
@@ -114,9 +114,11 @@ export default class AdminSettings extends React.Component {
|
|||||||
role='form'
|
role='form'
|
||||||
>
|
>
|
||||||
{this.renderSettings()}
|
{this.renderSettings()}
|
||||||
|
<div className='form-group'>
|
||||||
|
<FormError error={this.state.serverError}/>
|
||||||
|
</div>
|
||||||
<div className='form-group'>
|
<div className='form-group'>
|
||||||
<div className='col-sm-12'>
|
<div className='col-sm-12'>
|
||||||
<FormError error={this.state.serverError}/>
|
|
||||||
<SaveButton
|
<SaveButton
|
||||||
saving={this.state.saving}
|
saving={this.state.saving}
|
||||||
disabled={!this.state.saveNeeded || (this.canSave && !this.canSave())}
|
disabled={!this.state.saveNeeded || (this.canSave && !this.canSave())}
|
||||||
|
|||||||
@@ -54,10 +54,7 @@ export default class MultiSelectSetting extends React.Component {
|
|||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
value={this.props.selected}
|
value={this.props.selected}
|
||||||
/>
|
/>
|
||||||
<FormError
|
<FormError error={this.state.error}/>
|
||||||
noMargin={true}
|
|
||||||
error={this.state.error}
|
|
||||||
/>
|
|
||||||
</Setting>
|
</Setting>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ export default class FormError extends React.Component {
|
|||||||
// accepts either a single error or an array of errors
|
// accepts either a single error or an array of errors
|
||||||
return {
|
return {
|
||||||
error: React.PropTypes.node,
|
error: React.PropTypes.node,
|
||||||
noMargin: React.PropTypes.node,
|
|
||||||
errors: React.PropTypes.arrayOf(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
|
// look for the first truthy error to display
|
||||||
let message = this.props.error;
|
let message = this.props.error;
|
||||||
const noMargin = this.props.noMargin;
|
|
||||||
|
|
||||||
if (!message) {
|
if (!message) {
|
||||||
for (const error of this.props.errors) {
|
for (const error of this.props.errors) {
|
||||||
@@ -41,18 +39,8 @@ export default class FormError extends React.Component {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noMargin) {
|
|
||||||
return (
|
|
||||||
<div className='has-error'>
|
|
||||||
<label className='control-label'>
|
|
||||||
{message}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='form-group has-error'>
|
<div className='col-sm-12 has-error'>
|
||||||
<label className='control-label'>
|
<label className='control-label'>
|
||||||
{message}
|
{message}
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user