diff options
author | Robin Appelman <robin@icewind.nl> | 2017-09-27 17:59:56 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-09-27 17:59:56 +0200 |
commit | 2b7c489d75efa065d03978967b48a175e0019754 (patch) | |
tree | 97338f262123ce76593e2040a797a10100f41efc /apps/files_external | |
parent | a90b046a17356f806fe17c5bbdf121985d38a9ad (diff) | |
download | nextcloud-server-2b7c489d75efa065d03978967b48a175e0019754.tar.gz nextcloud-server-2b7c489d75efa065d03978967b48a175e0019754.zip |
ask for confirmation when deleting an external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/js/settings.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 30074ab179a..0003dbf0f75 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -1129,14 +1129,21 @@ MountConfigListView.prototype = _.extend({ return; } var storage = new this._storageConfigClass(configId); - this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS); - storage.destroy({ - success: function() { - $tr.remove(); - }, - error: function() { - self.updateStatus($tr, StorageConfig.Status.ERROR); + 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); + + storage.destroy({ + success: function () { + $tr.remove(); + }, + error: function () { + self.updateStatus($tr, StorageConfig.Status.ERROR); + } + }); } }); }, |