diff options
author | =Corey Hulen <corey@hulen.com> | 2015-06-14 23:53:32 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-06-14 23:53:32 -0800 |
commit | cf7a05f80f68b5b1c8bcc0089679dd497cec2506 (patch) | |
tree | 70007378570a6962d7c175ca96af732b71aeb6da /web/react/components/setting_item_max.jsx | |
download | chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.tar.gz chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.tar.bz2 chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.zip |
first commit
Diffstat (limited to 'web/react/components/setting_item_max.jsx')
-rw-r--r-- | web/react/components/setting_item_max.jsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/web/react/components/setting_item_max.jsx b/web/react/components/setting_item_max.jsx new file mode 100644 index 000000000..03f05b0cf --- /dev/null +++ b/web/react/components/setting_item_max.jsx @@ -0,0 +1,31 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +module.exports = React.createClass({ + render: function() { + var client_error = this.props.client_error ? <div className='form-group'><label className='col-sm-12 has-error'>{ this.props.client_error }</label></div> : null; + 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"> + <li className="row setting-list-item form-group"> + {inputs} + </li> + <li className="setting-list-item"> + <hr /> + { server_error } + { client_error } + <a className="btn btn-sm btn-primary" onClick={this.props.submit}>Submit</a> + <a className="btn btn-sm theme" href="#" onClick={this.props.updateSection}>Cancel</a> + </li> + </ul> + </li> + </ul> + ); + } +}); |