Disabled checkboxes and design fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
b9c448d855
commit
c435bfe703
|
@ -179,8 +179,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
.icon-more {
|
.icon-more {
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
height: 16px;
|
height: 44px;
|
||||||
width: 16px;
|
width: 44px;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
display: block;
|
display: block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -87,7 +87,8 @@
|
||||||
'{{/if}}' +
|
'{{/if}}' +
|
||||||
'{{#if showPasswordCheckBox}}' +
|
'{{#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}} value="1" />' +
|
' <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>' +
|
' <label for="showPassword-{{cid}}">{{enablePasswordLabel}}</label>' +
|
||||||
' </span></li>' +
|
' </span></li>' +
|
||||||
' <li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu"><span class="shareOption menuitem icon-share-pass">' +
|
' <li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu"><span class="shareOption menuitem icon-share-pass">' +
|
||||||
|
@ -96,16 +97,17 @@
|
||||||
' </span></li>' +
|
' </span></li>' +
|
||||||
'{{/if}}' +
|
'{{/if}}' +
|
||||||
'<li>' +
|
'<li>' +
|
||||||
'<span class="shareOption menuitem">' +
|
' <span class="shareOption menuitem">' +
|
||||||
'<input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox" {{#if hasExpireDate}}checked="checked"{{/if}}" />' +
|
' <input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox"' +
|
||||||
'<label for="expireDate-{{cid}}">{{expireDateLabel}}</label>' +
|
' {{#if hasExpireDate}}checked="checked"{{/if}} {{#if isExpirationEnforced}}disabled="disabled"{{/if}}" />' +
|
||||||
|
' <label for="expireDate-{{cid}}">{{expireDateLabel}}</label>' +
|
||||||
|
' </span>' +
|
||||||
'</li>' +
|
'</li>' +
|
||||||
'<li class="{{#unless hasExpireDate}}hidden{{/unless}}">' +
|
'<li class="{{#unless hasExpireDate}}hidden{{/unless}}">' +
|
||||||
'<span class="menuitem icon-expiredate expirationDateContainer-{{cid}}">' +
|
' <span class="menuitem icon-expiredate expirationDateContainer-{{cid}}">' +
|
||||||
' <label for="expirationDatePicker-{{cid}}" class="hidden-visually" value="{{expirationDate}}">{{expirationLabel}}</label>' +
|
' <label for="expirationDatePicker-{{cid}}" class="hidden-visually" value="{{expirationDate}}">{{expirationLabel}}</label>' +
|
||||||
' <input id="expirationDatePicker-{{cid}}" class="datepicker" type="text" placeholder="{{expirationDatePlaceholder}}" value="{{#if hasExpireDate}}{{expireDate}}{{else}}{{defaultExpireDate}}{{/if}}" />' +
|
' <input id="expirationDatePicker-{{cid}}" class="datepicker" type="text" placeholder="{{expirationDatePlaceholder}}" value="{{#if hasExpireDate}}{{expireDate}}{{else}}{{defaultExpireDate}}{{/if}}" />' +
|
||||||
'</span>' +
|
' </span>' +
|
||||||
'</span>' +
|
|
||||||
'</li>' +
|
'</li>' +
|
||||||
'<li>' +
|
'<li>' +
|
||||||
'<a href="#" class="share-add"><span class="icon-loading-small hidden"></span>' +
|
'<a href="#" class="share-add"><span class="icon-loading-small hidden"></span>' +
|
||||||
|
@ -138,7 +140,7 @@
|
||||||
'<ul>' +
|
'<ul>' +
|
||||||
'{{#if isPasswordEnforced}}' +
|
'{{#if isPasswordEnforced}}' +
|
||||||
' <li><span class="shareOption menuitem">' +
|
' <li><span class="shareOption menuitem">' +
|
||||||
' <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" checked="checked" class="checkbox showPasswordCheckbox" value="1" />' +
|
' <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" checked="checked" disabled class="checkbox showPasswordCheckbox" value="1" />' +
|
||||||
' <label for="showPassword-{{cid}}">{{enablePasswordLabel}}</label>' +
|
' <label for="showPassword-{{cid}}">{{enablePasswordLabel}}</label>' +
|
||||||
' </span></li>' +
|
' </span></li>' +
|
||||||
' <li class="linkPassMenu"><span class="shareOption menuitem icon-share-pass">' +
|
' <li class="linkPassMenu"><span class="shareOption menuitem icon-share-pass">' +
|
||||||
|
@ -189,7 +191,7 @@
|
||||||
// password
|
// password
|
||||||
'focusout input.linkPassText': 'onPasswordEntered',
|
'focusout input.linkPassText': 'onPasswordEntered',
|
||||||
'keyup input.linkPassText': 'onPasswordKeyUp',
|
'keyup input.linkPassText': 'onPasswordKeyUp',
|
||||||
'click .showPasswordCheckbox': 'onShowPasswordClick',
|
'change .showPasswordCheckbox': 'onShowPasswordClick',
|
||||||
'change .publicEditingCheckbox': 'onAllowPublicEditingChange',
|
'change .publicEditingCheckbox': 'onAllowPublicEditingChange',
|
||||||
// copy link url
|
// copy link url
|
||||||
'click .linkText': 'onLinkTextClick',
|
'click .linkText': 'onLinkTextClick',
|
||||||
|
@ -607,7 +609,7 @@
|
||||||
passwordLabel: t('core', 'Password'),
|
passwordLabel: t('core', 'Password'),
|
||||||
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
|
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
|
||||||
passwordPlaceholderInitial: passwordPlaceholderInitial,
|
passwordPlaceholderInitial: passwordPlaceholderInitial,
|
||||||
isPasswordSet: isPasswordSet || isPasswordEnabledByDefault,
|
isPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,
|
||||||
showPasswordCheckBox: showPasswordCheckBox,
|
showPasswordCheckBox: showPasswordCheckBox,
|
||||||
publicUpload: publicUpload && isLinkShare,
|
publicUpload: publicUpload && isLinkShare,
|
||||||
publicEditing: publicEditable,
|
publicEditing: publicEditable,
|
||||||
|
@ -629,6 +631,7 @@
|
||||||
expirationDatePlaceholder: t('core', 'Expiration date'),
|
expirationDatePlaceholder: t('core', 'Expiration date'),
|
||||||
hasExpireDate: hasExpireDate,
|
hasExpireDate: hasExpireDate,
|
||||||
isExpirationEnforced: isExpirationEnforced,
|
isExpirationEnforced: isExpirationEnforced,
|
||||||
|
isPasswordEnforced: isPasswordEnforced,
|
||||||
expireDate: expireDate,
|
expireDate: expireDate,
|
||||||
defaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today
|
defaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today
|
||||||
shareNote: this.model.get('linkShare').note,
|
shareNote: this.model.get('linkShare').note,
|
||||||
|
@ -642,14 +645,7 @@
|
||||||
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
|
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
|
||||||
passwordPlaceholderInitial: passwordPlaceholderInitial,
|
passwordPlaceholderInitial: passwordPlaceholderInitial,
|
||||||
showPasswordCheckBox: showPasswordCheckBox,
|
showPasswordCheckBox: showPasswordCheckBox,
|
||||||
expireDateLabel: t('core', 'Set expiration date'),
|
|
||||||
expirationLabel: t('core', 'Expiration'),
|
|
||||||
expirationDatePlaceholder: t('core', 'Expiration date'),
|
|
||||||
hasExpireDate: hasExpireDate,
|
|
||||||
isExpirationEnforced: isExpirationEnforced,
|
|
||||||
isPasswordEnforced: isPasswordEnforced,
|
isPasswordEnforced: isPasswordEnforced,
|
||||||
expireDate: expireDate,
|
|
||||||
defaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$el.html(linkShareTemplate({
|
this.$el.html(linkShareTemplate({
|
||||||
|
|
Loading…
Reference in New Issue