Remove encryption option for nextcloud external storage

Fixes #16017

Since it never worked we should not show it.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-08-20 16:28:03 +02:00
parent eed3a534ca
commit 85406bcaa5
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 10 additions and 2 deletions

View File

@ -475,7 +475,9 @@ MountOptionsDropdown.prototype = {
})); }));
this.$el = $el; this.$el = $el;
this.setOptions(mountOptions, visibleOptions); var storage = $container[0].parentNode.className;
this.setOptions(mountOptions, visibleOptions, storage);
this.$el.appendTo($container); this.$el.appendTo($container);
MountOptionsDropdown._last = this; MountOptionsDropdown._last = this;
@ -523,7 +525,13 @@ MountOptionsDropdown.prototype = {
* @param {Object} options mount options * @param {Object} options mount options
* @param {Array} visibleOptions enabled mount options * @param {Array} visibleOptions enabled mount options
*/ */
setOptions: function(options, visibleOptions) { setOptions: function(options, visibleOptions, storage) {
if (storage === 'owncloud') {
var ind = visibleOptions.indexOf('encrypt');
if (ind > 0) {
visibleOptions.splice(ind, 1);
}
}
var $el = this.$el; var $el = this.$el;
_.each(options, function(value, key) { _.each(options, function(value, key) {
var $optionEl = $el.find('input, select').filterAttr('name', key); var $optionEl = $el.find('input, select').filterAttr('name', key);