Files
mattermost/web/react/components/setting_item_max.jsx

32 lines
1.5 KiB
React
Raw Normal View History

2015-06-14 23:53:32 -08:00
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
module.exports = React.createClass({
render: function() {
2015-08-20 07:45:29 -07:00
var clientError = this.props.client_error ? <div className='form-group'><label className='col-sm-12 has-error'>{ this.props.client_error }</label></div> : null;
2015-06-14 23:53:32 -08:00
var server_error = this.props.server_error ? <div className='form-group'><label className='col-sm-12 has-error'>{ this.props.server_error }</label></div> : null;
var inputs = this.props.inputs;
return (
<ul className="section-max form-horizontal">
<li className="col-sm-12 section-title">{this.props.title}</li>
<li className="col-sm-9 col-sm-offset-3">
<ul className="setting-list">
2015-06-28 04:18:24 +05:00
<li className="setting-list-item">
2015-06-14 23:53:32 -08:00
{inputs}
</li>
<li className="setting-list-item">
<hr />
{ server_error }
2015-08-18 09:43:22 -04:00
{ clientError }
{ this.props.submit ? <a className="btn btn-sm btn-primary" href="#" onClick={this.props.submit}>Submit</a> : "" }
2015-06-14 23:53:32 -08:00
<a className="btn btn-sm theme" href="#" onClick={this.props.updateSection}>Cancel</a>
</li>
</ul>
</li>
</ul>
);
}
});