diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-09 16:36:20 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-13 11:28:25 +0200 |
commit | d56d03e230a20a621113a2b90064f331b3952f1b (patch) | |
tree | afc4e1a6a5cf1ec77b96bef43a8181293102949f /core/js/share.js | |
parent | ec045b251c5e42ce3762f3aefc0936581fd21030 (diff) | |
download | nextcloud-server-d56d03e230a20a621113a2b90064f331b3952f1b.tar.gz nextcloud-server-d56d03e230a20a621113a2b90064f331b3952f1b.zip |
add information about default expire date to the share dialog
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index 2813570f718..2d9de62694b 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -219,7 +219,18 @@ OC.Share={ html += '<div id="link">'; html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">'+t('core', 'Share link')+'</label>'; html += '<br />'; + + var defaultExpireMessage = ''; + if ((itemType === 'folder' || itemType === 'file') && oc_appconfig.core.defaultExpireDateEnabled === 'yes') { + if (oc_appconfig.core.defaultExpireDateEnforced === 'yes') { + defaultExpireMessage = t('core', 'The public link will expire no later than {days} days after it is created', {'days': oc_appconfig.core.defaultExpireDate}) + '<br/>'; + } else { + defaultExpireMessage = t('core', 'By default the public link will expire after {days} days', {'days': oc_appconfig.core.defaultExpireDate}) + '<br/>'; + } + } + html += '<div id="defaultExpireMessage">'+defaultExpireMessage+'</div>'; html += '<input id="linkText" type="text" readonly="readonly" />'; + html += '<input type="checkbox" name="showPassword" id="showPassword" value="1" style="display:none;" /><label for="showPassword" style="display:none;">'+t('core', 'Password protect')+'</label>'; html += '<div id="linkPass">'; html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />'; @@ -490,19 +501,20 @@ OC.Share={ $('#linkPassText').attr('placeholder', '**********'); } $('#expiration').show(); + $('#defaultExpireMessage').show(); $('#emailPrivateLink #email').show(); $('#emailPrivateLink #emailButton').show(); $('#allowPublicUploadWrapper').show(); }, hideLink:function() { $('#linkText').hide('blind'); + $('#defaultExpireMessage').hide(); $('#showPassword').hide(); $('#showPassword+label').hide(); $('#linkPass').hide(); $('#emailPrivateLink #email').hide(); $('#emailPrivateLink #emailButton').hide(); $('#allowPublicUploadWrapper').hide(); - $('#expirationDate').hide(); }, dirname:function(path) { return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, ''); |