diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-06-19 11:49:59 -0700 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-06-19 11:49:59 -0700 |
commit | 9f652310a5ee9c51633264d08434e4a08224a9eb (patch) | |
tree | 80e91b8343f567f301d247392d09ba620909076d /web/react/components/confirm_modal.jsx | |
parent | c1740ffa2fcfcf663d8e847cfe03187fb600b6c1 (diff) | |
parent | 6c8d7b1b9fe00e60582900b7c1e782e2c0a00325 (diff) | |
download | chat-9f652310a5ee9c51633264d08434e4a08224a9eb.tar.gz chat-9f652310a5ee9c51633264d08434e4a08224a9eb.tar.bz2 chat-9f652310a5ee9c51633264d08434e4a08224a9eb.zip |
Merge pull request #16 from rgarmsen2295/master
Remerging
Diffstat (limited to 'web/react/components/confirm_modal.jsx')
-rw-r--r-- | web/react/components/confirm_modal.jsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/web/react/components/confirm_modal.jsx b/web/react/components/confirm_modal.jsx new file mode 100644 index 000000000..3be13cf9b --- /dev/null +++ b/web/react/components/confirm_modal.jsx @@ -0,0 +1,31 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +module.exports = React.createClass({ + handleConfirm: function() { + $('#'+this.props.parent_id).attr('data-confirm', 'true'); + $('#'+this.props.parent_id).modal('hide'); + $('#'+this.props.id).modal('hide'); + }, + render: function() { + return ( + <div className="modal fade" id={this.props.id} tabIndex="-1" role="dialog" aria-hidden="true"> + <div className="modal-dialog"> + <div className="modal-content"> + <div className="modal-header"> + <h4 className="modal-title">{this.props.title}</h4> + </div> + <div className="modal-body"> + {this.props.message} + </div> + <div className="modal-footer"> + <button type="button" className="btn btn-default" data-dismiss="modal">Cancel</button> + <button onClick={this.handleConfirm} type="button" className="btn btn-primary">{this.props.confirm_button}</button> + </div> + </div> + </div> + </div> + ); + } +}); + |