mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-21 10:01:46 +00:00
Confirm leaving networks.
This commit is contained in:
parent
8c7a4efe1a
commit
992438f054
@ -4,17 +4,19 @@ var ZeroTierNetwork = React.createClass({
|
||||
},
|
||||
|
||||
leaveNetwork: function(event) {
|
||||
Ajax.call({
|
||||
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'DELETE',
|
||||
success: function(data) {
|
||||
if (this.props.onNetworkDeleted)
|
||||
this.props.onNetworkDeleted(this.props.nwid);
|
||||
}.bind(this),
|
||||
error: function(error) {
|
||||
}.bind(this)
|
||||
});
|
||||
if (confirm("Are you sure you want to leave this network?")) {
|
||||
Ajax.call({
|
||||
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'DELETE',
|
||||
success: function(data) {
|
||||
if (this.props.onNetworkDeleted)
|
||||
this.props.onNetworkDeleted(this.props.nwid);
|
||||
}.bind(this),
|
||||
error: function(error) {
|
||||
}.bind(this)
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
},
|
||||
|
||||
|
2
ui/ztui.min.js
vendored
2
ui/ztui.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user