diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-30 11:08:04 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-30 11:08:04 +0200 |
commit | 67609699bc4430287a35b676dd63968adeca1bd3 (patch) | |
tree | 99c93d10f9a45a1a757e2e29b79ab5044767ad7d /core | |
parent | 750f19340fc39e5ba03a18fa97a5e2e470e965a1 (diff) | |
parent | 8def1383c8bfaad55cf7917af275b23977236323 (diff) | |
download | nextcloud-server-67609699bc4430287a35b676dd63968adeca1bd3.tar.gz nextcloud-server-67609699bc4430287a35b676dd63968adeca1bd3.zip |
Merge pull request #19443 from owncloud/sharedialog-passworderror
Fix share link password error
Diffstat (limited to 'core')
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index cb9325231dd..3d8fb461461 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -144,17 +144,33 @@ }, onPasswordEntered: function() { - var password = this.$el.find('#linkPassText').val(); + var self = this; + var $loading = this.$el.find('#linkPass .icon-loading-small'); + if (!$loading.hasClass('hidden')) { + // still in process + return; + } + var $input = this.$el.find('#linkPassText'); + $input.removeClass('error'); + var password = $input.val(); if(password === '') { return; } - this.$el.find('#linkPass .icon-loading-small') + $loading .removeClass('hidden') .addClass('inlineblock'); this.model.setPassword(password); - this.model.saveLinkShare(); + this.model.saveLinkShare({}, { + error: function(model, msg) { + $loading.removeClass('inlineblock').addClass('hidden'); + $input.addClass('error'); + $input.attr('title', msg); + $input.tooltip({placement: 'bottom', trigger: 'manual'}); + $input.tooltip('show'); + } + }); }, onAllowPublicUploadChange: function() { |