Fix updating the password of a link share when passwords are enforced
The password input was shown in the popup menu when passwords were not enforced, or when they were enforced but no password was set, which prevented updating/changing the password once set. As the popover menu is shown only when the share is a link share, and the password input should be shown too when password are enforced and a password is set no condition is needed, so now the password input is always shown. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
ab684934ea
commit
355edcee74
|
@ -85,7 +85,6 @@
|
|||
' <label for="sharingDialogAllowPublicEditing-{{cid}}">{{publicEditingLabel}}</label>' +
|
||||
' </span></li>' +
|
||||
'{{/if}}' +
|
||||
'{{#if showPasswordCheckBox}}' +
|
||||
' <li><span class="shareOption menuitem">' +
|
||||
' <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" class="checkbox showPasswordCheckbox"' +
|
||||
' {{#if isPasswordSet}}checked="checked"{{/if}} {{#if isPasswordEnforced}}disabled="disabled"{{/if}} value="1" />' +
|
||||
|
@ -96,7 +95,6 @@
|
|||
' <input type="submit" class="icon-confirm share-pass-submit" value="" />' +
|
||||
' <span class="icon icon-loading-small hidden"></span>' +
|
||||
' </span></li>' +
|
||||
'{{/if}}' +
|
||||
'<li>' +
|
||||
' <span class="shareOption menuitem">' +
|
||||
' <input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox"' +
|
||||
|
@ -536,9 +534,6 @@
|
|||
var isPasswordSet = !!this.model.get('linkShare').password;
|
||||
var isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')
|
||||
var isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true
|
||||
var showPasswordCheckBox = isLinkShare
|
||||
&& ( !this.configModel.get('enforcePasswordForPublicLink')
|
||||
|| !this.model.get('linkShare').password);
|
||||
var passwordPlaceholderInitial = this.configModel.get('enforcePasswordForPublicLink')
|
||||
? PASSWORD_PLACEHOLDER_MESSAGE : PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL;
|
||||
|
||||
|
@ -610,7 +605,6 @@
|
|||
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
|
||||
passwordPlaceholderInitial: passwordPlaceholderInitial,
|
||||
isPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,
|
||||
showPasswordCheckBox: showPasswordCheckBox,
|
||||
publicUpload: publicUpload && isLinkShare,
|
||||
publicEditing: publicEditable,
|
||||
publicEditingChecked: publicEditingChecked,
|
||||
|
|
Loading…
Reference in New Issue