summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmoodspin@users.noreply.github.com>2016-07-05 20:13:50 +0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-07-05 11:13:50 -0400
commit068df708c0ca02f563579ba48c2ed924388107ed (patch)
tree46b56e0669a9b4b45f9da969dfd2bb7ac87a3e0c
parentb8189369edff09b80470b2e1914d18bcb46d02bb (diff)
downloadchat-068df708c0ca02f563579ba48c2ed924388107ed.tar.gz
chat-068df708c0ca02f563579ba48c2ed924388107ed.tar.bz2
chat-068df708c0ca02f563579ba48c2ed924388107ed.zip
Fixing errors in system console (#3484)
-rw-r--r--webapp/components/admin_console/admin_settings.jsx4
-rw-r--r--webapp/components/admin_console/multiselect_settings.jsx5
-rw-r--r--webapp/components/form_error.jsx14
3 files changed, 5 insertions, 18 deletions
diff --git a/webapp/components/admin_console/admin_settings.jsx b/webapp/components/admin_console/admin_settings.jsx
index 6765dd069..2ab2c6332 100644
--- a/webapp/components/admin_console/admin_settings.jsx
+++ b/webapp/components/admin_console/admin_settings.jsx
@@ -115,8 +115,10 @@ export default class AdminSettings extends React.Component {
>
{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())}
diff --git a/webapp/components/admin_console/multiselect_settings.jsx b/webapp/components/admin_console/multiselect_settings.jsx
index 3120e03a8..8aad5d6eb 100644
--- a/webapp/components/admin_console/multiselect_settings.jsx
+++ b/webapp/components/admin_console/multiselect_settings.jsx
@@ -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>
);
}
diff --git a/webapp/components/form_error.jsx b/webapp/components/form_error.jsx
index 395adfaab..3c73759c5 100644
--- a/webapp/components/form_error.jsx
+++ b/webapp/components/form_error.jsx
@@ -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>