mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
reset password field properties before we hide it
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
c7b1a48da7
commit
0dc13d098f
1 changed files with 7 additions and 1 deletions
|
|
@ -515,15 +515,21 @@
|
|||
var shareId = li.data('share-id');
|
||||
var passwordContainerClass = '.passwordContainer-' + this.cid + '-' + shareId;
|
||||
var passwordContainer = $(passwordContainerClass);
|
||||
var loading = this.$el.find(passwordContainerClass + ' .icon-loading-small');
|
||||
var inputClass = '#passwordField-' + this.cid + '-' + shareId;
|
||||
var passwordField = $(inputClass);
|
||||
var state = element.prop('checked');
|
||||
passwordContainer.toggleClass('hidden', !state);
|
||||
if (!state) {
|
||||
this.model.updateShare(shareId, {password: ''});
|
||||
passwordField.attr('value', '');
|
||||
passwordField.removeClass('error');
|
||||
passwordField.tooltip('hide');
|
||||
loading.addClass('hidden');
|
||||
passwordField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE);
|
||||
// We first need to reset the password field before we hide it
|
||||
passwordContainer.toggleClass('hidden', !state);
|
||||
} else {
|
||||
passwordContainer.toggleClass('hidden', !state);
|
||||
passwordField = '#passwordField-' + this.cid + '-' + shareId;
|
||||
this.$(passwordField).focus();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue