Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-01-30 11:53:16 +0300
committerGitHub <noreply@github.com>2019-01-30 11:53:16 +0300
commitbce6e7fc2be534977e35b2e5037501b2efae514d (patch)
tree467e863ee44f44db1d88d4cfe57eb2ef4f8af16f
parentc66f93ad58cf185ad1e4c01ece23f742c65ae297 (diff)
parenta94fa97350056b600f3d06cd6e500a0ce2ab12d6 (diff)
Merge pull request #13901 from nextcloud/stable14-13897-fix-updating-the-password-of-a-link-share-when-passwords-are-enforced
[stable14] Fix updating the password of a link share when passwords are enforced
-rw-r--r--core/js/sharedialoglinkshareview.js25
1 files changed, 11 insertions, 14 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index 4d513bcee01..bb1dcf2b2bd 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -85,18 +85,20 @@
' <label for="sharingDialogAllowPublicEditing-{{cid}}">{{publicEditingLabel}}</label>' +
' </span></li>' +
'{{/if}}' +
- '{{#if showPasswordCheckBox}}' +
- ' <li><span class="shareOption menuitem">' +
+ '<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" />' +
' <label for="showPassword-{{cid}}">{{enablePasswordLabel}}</label>' +
- ' </span></li>' +
- ' <li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu"><span class="shareOption menuitem icon-share-pass">' +
- ' <input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />' +
- ' <input type="submit" class="icon-confirm share-pass-submit" value="" />' +
- ' <span class="icon icon-loading-small hidden"></span>' +
- ' </span></li>' +
- '{{/if}}' +
+ ' </span>' +
+ '</li>' +
+ '<li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu">' +
+ ' <span class="shareOption menuitem icon-share-pass">' +
+ ' <input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />' +
+ ' <input type="submit" class="icon-confirm share-pass-submit" value="" />' +
+ ' <span class="icon icon-loading-small hidden"></span>' +
+ ' </span>' +
+ '</li>' +
'<li>' +
' <span class="shareOption menuitem">' +
' <input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox"' +
@@ -536,9 +538,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 +609,6 @@
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
passwordPlaceholderInitial: passwordPlaceholderInitial,
isPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,
- showPasswordCheckBox: showPasswordCheckBox,
publicUpload: publicUpload && isLinkShare,
publicEditing: publicEditable,
publicEditingChecked: publicEditingChecked,
@@ -644,7 +642,6 @@
passwordLabel: t('core', 'Password'),
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
passwordPlaceholderInitial: passwordPlaceholderInitial,
- showPasswordCheckBox: showPasswordCheckBox,
isPasswordEnforced: isPasswordEnforced,
});