diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-11-06 10:47:27 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-11-06 10:47:27 +0100 |
commit | a3bf860be7f4e9085fc3bb569b411c08b89d38ea (patch) | |
tree | 4cd6361c79372b2c6bd82924c71ba0ff410f6370 /core | |
parent | eeeb19079f3c6a8893f451ca8abb2f5d585390ed (diff) | |
download | nextcloud-server-a3bf860be7f4e9085fc3bb569b411c08b89d38ea.tar.gz nextcloud-server-a3bf860be7f4e9085fc3bb569b411c08b89d38ea.zip |
Fix sharedialog failure handler
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index 4f4db0eec79..4ce337357a0 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -251,11 +251,23 @@ } }, error: function() { + // empty function to override the default Dialog warning + } + })).fail(function(response) { + // password failure? Show error + self.password = '' + if (isPasswordEnforced && response && response.responseJSON && response.responseJSON.ocs.meta && response.responseJSON.ocs.meta.message) { + $input = self.$el.find('.pending #enforcedPassText') + $input.tooltip('destroy'); + $input.attr('title', response.responseJSON.ocs.meta.message); + $input.tooltip({placement: 'bottom', trigger: 'manual'}); + $input.tooltip('show'); + } else { OC.Notification.showTemporary(t('core', 'Unable to create a link share')); $loading.addClass('hidden'); $li.find('.icon').removeClass('hidden'); } - })).then(function(response) { + }).then(function(response) { // resolve before success newShareId = response.ocs.data.id }); |