summaryrefslogtreecommitdiffstats
path: root/web/react/components/confirm_modal.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-06-19 10:40:23 -0800
committerCorey Hulen <corey@hulen.com>2015-06-19 10:40:23 -0800
commit98d9050d07657c696a9c7ba8a1262d3fe8708623 (patch)
treeeb2d0b8fbdb33da0a067139b522a9631c99f10a6 /web/react/components/confirm_modal.jsx
parentce0741c0b3dc99384e20f13829fa58754bfb479c (diff)
parent1cbb10105ba7c95d27be816d2a9e5c83e8773779 (diff)
downloadchat-98d9050d07657c696a9c7ba8a1262d3fe8708623.tar.gz
chat-98d9050d07657c696a9c7ba8a1262d3fe8708623.tar.bz2
chat-98d9050d07657c696a9c7ba8a1262d3fe8708623.zip
Merge pull request #39 from mattermost/mm-1315
HELIUM fixes mm-1315 adds confirmation dialog when closing invite dialog with typed in emails
Diffstat (limited to 'web/react/components/confirm_modal.jsx')
-rw-r--r--web/react/components/confirm_modal.jsx31
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>
+ );
+ }
+});
+