Browse Source

ask for confirmation when deleting an external storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/6676/head
Robin Appelman 8 years ago
parent
commit
2b7c489d75
No known key found for this signature in database GPG Key ID: CBCA68FBAEBF98C9
  1. 7
      apps/files_external/js/settings.js

7
apps/files_external/js/settings.js

@ -1129,6 +1129,11 @@ MountConfigListView.prototype = _.extend({
return; return;
} }
var storage = new this._storageConfigClass(configId); var storage = new this._storageConfigClass(configId);
OC.dialogs.confirm(t('files_external', 'Are you sure you want to delete this external storage', {
storage: this.mountPoint
}), t('files_external', 'Delete storage?'), function(confirm) {
if (confirm) {
this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS); this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS);
storage.destroy({ storage.destroy({
@ -1139,6 +1144,8 @@ MountConfigListView.prototype = _.extend({
self.updateStatus($tr, StorageConfig.Status.ERROR); self.updateStatus($tr, StorageConfig.Status.ERROR);
} }
}); });
}
});
}, },
/** /**

Loading…
Cancel
Save