summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-09-28 12:49:31 +0200
committerGitHub <noreply@github.com>2017-09-28 12:49:31 +0200
commit1c2da7d7d38d3bffef1ff2396edab65e9d3370b8 (patch)
tree168f7a8cb0c27417225c7a8770ca1417aa07cd4a /apps
parente5d39e63d15069d10fa723c34472be4b0b95d1ad (diff)
parent2b7c489d75efa065d03978967b48a175e0019754 (diff)
downloadnextcloud-server-1c2da7d7d38d3bffef1ff2396edab65e9d3370b8.tar.gz
nextcloud-server-1c2da7d7d38d3bffef1ff2396edab65e9d3370b8.zip
Merge pull request #6676 from nextcloud/confirm-storage-delete
ask for confirmation when deleting an external storage
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/js/settings.js21
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);
+ }
+ });
}
});
},