summaryrefslogtreecommitdiffstats
path: root/core/js/share
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-31 11:43:05 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-01 21:33:05 +0100
commita7ea3d29fa6baedb47e2a2f6677c7e0d166b6436 (patch)
treef2f407fbe37cac3e3b2856901ba62c2f650212c4 /core/js/share
parent260290ec41c61bebb711db174db95fd18ba1aa87 (diff)
downloadnextcloud-server-a7ea3d29fa6baedb47e2a2f6677c7e0d166b6436.tar.gz
nextcloud-server-a7ea3d29fa6baedb47e2a2f6677c7e0d166b6436.zip
Fix password enforcement
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/js/share')
-rw-r--r--core/js/share/sharedialoglinkshareview.handlebars17
-rw-r--r--core/js/share/sharedialoglinkshareview_popover_menu.handlebars18
-rw-r--r--core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars24
-rw-r--r--core/js/share/sharedialogshareelistview.handlebars2
-rw-r--r--core/js/share/sharedialogshareelistview_popover_menu.handlebars16
5 files changed, 45 insertions, 32 deletions
diff --git a/core/js/share/sharedialoglinkshareview.handlebars b/core/js/share/sharedialoglinkshareview.handlebars
index 9b44596f7a3..64f52704290 100644
--- a/core/js/share/sharedialoglinkshareview.handlebars
+++ b/core/js/share/sharedialoglinkshareview.handlebars
@@ -1,12 +1,17 @@
{{#if shareAllowed}}
-<ul id="shareLink" class="shareWithList">
+<ul class="shareWithList">
{{#if nolinkShares}}
- <li>
+ <li data-share-id="new-share">
<div class="avatar icon-public-white"></div>
<span class="username">{{newShareLabel}}</span>
<span class="sharingOptionsGroup">
- <span class="icon icon-add new-share has-tooltip" title="{{newShareTitle}}"></span>
- <span class="icon icon-loading-small hidden"></span>
+ <div class="share-menu">
+ <a href="#" class="icon icon-add new-share has-tooltip {{#if showPending}}hidden{{/if}}" title="{{newShareTitle}}"></a>
+ <span class="icon icon-loading-small {{#unless showPending}}hidden{{/unless}}"></span>
+ {{#if showPending}}
+ {{{pendingPopoverMenu}}}
+ {{/if}}
+ </div>
</span>
</li>
{{/if}}
@@ -16,7 +21,9 @@
<span class="sharingOptionsGroup">
<a href="#" class="clipboard-button icon icon-clippy has-tooltip" data-clipboard-text="{{shareLinkURL}}" title="{{copyLabel}}"></a>
- <div class="share-menu" tabindex="0"><span class="icon icon-more"></span>
+ <div class="share-menu">
+ <a href="#" class="icon icon-more {{#if showPending}}hidden{{/if}}"></a>
+ <span class="icon icon-loading-small {{#unless showPending}}hidden{{/unless}}"></span>
{{#if showPending}}
{{{pendingPopoverMenu}}}
{{else}}
diff --git a/core/js/share/sharedialoglinkshareview_popover_menu.handlebars b/core/js/share/sharedialoglinkshareview_popover_menu.handlebars
index 41324480c40..97a642fbf9a 100644
--- a/core/js/share/sharedialoglinkshareview_popover_menu.handlebars
+++ b/core/js/share/sharedialoglinkshareview_popover_menu.handlebars
@@ -14,7 +14,7 @@
</li>
{{#if showHideDownloadCheckbox}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<span class="icon-loading-small hidden"></span>
<input type="checkbox" name="hideDownload" id="sharingDialogHideDownload-{{cid}}" class="checkbox hideDownloadCheckbox"
{{#if hideDownload}}checked="checked"{{/if}} />
@@ -24,20 +24,20 @@
{{/if}}
{{#if publicUpload}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<span class="icon-loading-small hidden"></span>
<input type="radio" name="publicUpload" value="{{publicUploadRValue}}" id="sharingDialogAllowPublicUpload-r-{{cid}}" class="radio publicUploadRadio" {{{publicUploadRChecked}}} />
<label for="sharingDialogAllowPublicUpload-r-{{cid}}">{{publicUploadRLabel}}</label>
</span>
</li>
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<span class="icon-loading-small hidden"></span>
<input type="radio" name="publicUpload" value="{{publicUploadRWValue}}" id="sharingDialogAllowPublicUpload-rw-{{cid}}" class="radio publicUploadRadio" {{{publicUploadRWChecked}}} />
<label for="sharingDialogAllowPublicUpload-rw-{{cid}}">{{publicUploadRWLabel}}</label>
</span></li>
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<span class="icon-loading-small hidden"></span>
<input type="radio" name="publicUpload" value="{{publicUploadWValue}}" id="sharingDialogAllowPublicUpload-w-{{cid}}" class="radio publicUploadRadio" {{{publicUploadWChecked}}} />
<label for="sharingDialogAllowPublicUpload-w-{{cid}}">{{publicUploadWLabel}}</label>
@@ -46,7 +46,7 @@
{{/if}}
{{#if publicEditing}}
<li id="allowPublicEditingWrapper">
- <span class="shareOption menuitem">
+ <span class="menuitem">
<span class="icon-loading-small hidden"></span>
<input type="checkbox" name="allowPublicEditing" id="sharingDialogAllowPublicEditing-{{cid}}" class="checkbox publicEditingCheckbox" {{{publicEditingChecked}}} />
<label for="sharingDialogAllowPublicEditing-{{cid}}">{{publicEditingLabel}}</label>
@@ -55,21 +55,21 @@
{{/if}}
{{#if showPasswordCheckBox}}
<li>
- <span class="shareOption menuitem">
+ <span class="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">
+ <span class="menuitem icon-share-pass">
<input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />
<span class="icon icon-loading-small hidden"></span>
</span>
</li>
{{/if}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox"
{{#if hasExpireDate}}checked="checked"{{/if}} {{#if isExpirationEnforced}}disabled="disabled"{{/if}} />
<label for="expireDate-{{cid}}">{{expireDateLabel}}</label>
@@ -100,7 +100,7 @@
</li>
{{#each social}}
<li>
- <a href="#" class="shareOption menuitem pop-up" data-url="{{url}}" data-window="{{newWindow}}">
+ <a href="#" class="menuitem pop-up" data-url="{{url}}" data-window="{{newWindow}}">
<span class="icon {{iconClass}}"></span>
<span>{{label}}</span>
</a>
diff --git a/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars b/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars
index e39c082315b..f789d7ae807 100644
--- a/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars
+++ b/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars
@@ -1,14 +1,20 @@
-<div class="popovermenu pendingpopover menu">
+<div class="popovermenu open menu">
<ul>
{{#if isPasswordEnforced}}
- <li><span class="shareOption menuitem">
- <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" checked="checked" disabled class="checkbox showPasswordCheckbox" value="1" />
- <label for="showPassword-{{cid}}">{{enablePasswordLabel}}</label>
- </span></li>
- <li class="linkPassMenu"><span class="shareOption menuitem icon-share-pass">
- <input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />
- <span class="icon icon-loading-small hidden"></span>
- </span></li>
+ <li>
+ <span class="menuitem icon-info">
+ <p>{{enforcedPasswordLabel}}</p>
+ </span>
+ </li>
+ <li class="linkPassMenu">
+ <span class="menuitem">
+ <form autocomplete="off" class="enforcedPassForm">
+ <input id="enforcedPassText" required class="enforcedPassText" type="password"
+ placeholder="{{passwordPlaceholder}}" autocomplete="new-password" minlength="4" />
+ <input type="submit" value=" " class="primary icon-checkmark-white">
+ </form>
+ </span>
+ </li>
{{/if}}
</ul>
</div>
diff --git a/core/js/share/sharedialogshareelistview.handlebars b/core/js/share/sharedialogshareelistview.handlebars
index dc2496daaa8..92c07f80290 100644
--- a/core/js/share/sharedialogshareelistview.handlebars
+++ b/core/js/share/sharedialogshareelistview.handlebars
@@ -5,7 +5,7 @@
<span class="username" title="{{shareWithTitle}}">{{shareWithDisplayName}}</span>
<span class="sharingOptionsGroup">
{{#if editPermissionPossible}}
- <span class="shareOption">
+ <span>
<input id="canEdit-{{cid}}-{{shareId}}" type="checkbox" name="edit" class="permissions checkbox" />
<label for="canEdit-{{cid}}-{{shareId}}">{{canEditLabel}}</label>
</span>
diff --git a/core/js/share/sharedialogshareelistview_popover_menu.handlebars b/core/js/share/sharedialogshareelistview_popover_menu.handlebars
index 84b6c93dde5..64fe51a3d24 100644
--- a/core/js/share/sharedialogshareelistview_popover_menu.handlebars
+++ b/core/js/share/sharedialogshareelistview_popover_menu.handlebars
@@ -2,7 +2,7 @@
<ul>
{{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isMailShare}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="canShare-{{cid}}-{{shareId}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />
<label for="canShare-{{cid}}-{{shareId}}">{{canShareLabel}}</label>
</span>
@@ -11,7 +11,7 @@
{{#if isFolder}}
{{#if createPermissionPossible}}{{#unless isMailShare}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="canCreate-{{cid}}-{{shareId}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>
<label for="canCreate-{{cid}}-{{shareId}}">{{createPermissionLabel}}</label>
</span>
@@ -19,7 +19,7 @@
{{/unless}}{{/if}}
{{#if updatePermissionPossible}}{{#unless isMailShare}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="canUpdate-{{cid}}-{{shareId}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>
<label for="canUpdate-{{cid}}-{{shareId}}">{{updatePermissionLabel}}</label>
</span>
@@ -27,7 +27,7 @@
{{/unless}}{{/if}}
{{#if deletePermissionPossible}}{{#unless isMailShare}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="canDelete-{{cid}}-{{shareId}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>
<label for="canDelete-{{cid}}-{{shareId}}">{{deletePermissionLabel}}</label>
</span>
@@ -37,14 +37,14 @@
{{#if isMailShare}}
{{#if hasCreatePermission}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="secureDrop-{{cid}}-{{shareId}}" type="checkbox" name="secureDrop" class="checkbox secureDrop" {{#if secureDropMode}}checked="checked"{{/if}} data-permissions="{{readPermission}}"/>
<label for="secureDrop-{{cid}}-{{shareId}}">{{secureDropLabel}}</label>
</span>
</li>
{{/if}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="password-{{cid}}-{{shareId}}" type="checkbox" name="password" class="password checkbox" {{#if isPasswordSet}}checked="checked"{{/if}}{{#if isPasswordSet}}{{#if isPasswordForMailSharesRequired}}disabled=""{{/if}}{{/if}}" />
<label for="password-{{cid}}-{{shareId}}">{{passwordLabel}}</label>
</span>
@@ -58,7 +58,7 @@
</li>
{{#if isTalkEnabled}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="passwordByTalk-{{cid}}-{{shareId}}" type="checkbox" name="passwordByTalk" class="passwordByTalk checkbox" {{#if isPasswordByTalkSet}}checked="checked"{{/if}} />
<label for="passwordByTalk-{{cid}}-{{shareId}}">{{passwordByTalkLabel}}</label>
</span>
@@ -73,7 +73,7 @@
{{/if}}
{{/if}}
<li>
- <span class="shareOption menuitem">
+ <span class="menuitem">
<input id="expireDate-{{cid}}-{{shareId}}" type="checkbox" name="expirationDate" class="expireDate checkbox" {{#if hasExpireDate}}checked="checked"{{/if}}" />
<label for="expireDate-{{cid}}-{{shareId}}">{{expireDateLabel}}</label>
</span>