From 431eece9852c3a546dc7205cf6b03f6c0072c5a8 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 17 Jul 2021 00:56:03 +0200 Subject: [PATCH] Filepicker - hide empty create action box if creation is not allowed Signed-off-by: szaimen --- core/src/OC/dialogs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js index 1e39a52c2f8ef..e68eb9beb68a6 100644 --- a/core/src/OC/dialogs.js +++ b/core/src/OC/dialogs.js @@ -320,8 +320,8 @@ const Dialogs = { } var newButton = self.$filePicker.find('.actions.creatable .button-add') - if (type === self.FILEPICKER_TYPE_CHOOSE && !options.allowDirectoryChooser) { - newButton.hide() + if (type === this.FILEPICKER_TYPE_CHOOSE && !options.allowDirectoryChooser) { + self.$filePicker.find('.actions.creatable').hide() } newButton.on('focus', function() { self.$filePicker.ocdialog('setEnterCallback', function() {