mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-22 10:20:52 +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) {
|
leaveNetwork: function(event) {
|
||||||
Ajax.call({
|
if (confirm("Are you sure you want to leave this network?")) {
|
||||||
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
|
Ajax.call({
|
||||||
cache: false,
|
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
|
||||||
type: 'DELETE',
|
cache: false,
|
||||||
success: function(data) {
|
type: 'DELETE',
|
||||||
if (this.props.onNetworkDeleted)
|
success: function(data) {
|
||||||
this.props.onNetworkDeleted(this.props.nwid);
|
if (this.props.onNetworkDeleted)
|
||||||
}.bind(this),
|
this.props.onNetworkDeleted(this.props.nwid);
|
||||||
error: function(error) {
|
}.bind(this),
|
||||||
}.bind(this)
|
error: function(error) {
|
||||||
});
|
}.bind(this)
|
||||||
|
});
|
||||||
|
}
|
||||||
event.preventDefault();
|
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