';
+
+ 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}) + '
';
+ } else {
+ defaultExpireMessage = t('core', 'By default the public link will expire after {days} days', {'days': oc_appconfig.core.defaultExpireDate}) + '
';
html += '
';
@@ -239,6 +250,7 @@ OC.Share={
html += '
';
dropDownEl = $(html);
dropDownEl = dropDownEl.appendTo(appendTo);
@@ -490,19 +502,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(/\/[^\/]*$/, '');
@@ -734,6 +747,9 @@ $(document).ready(function() {
OC.dialogs.alert(t('core', 'Error unsetting expiration date'), t('core', 'Error'));
}
$('#expirationDate').hide('blind');
+ if (oc_appconfig.core.defaultExpireDateEnforced === 'no') {
+ $('#defaultExpireMessage'). show('blind');
+ }
});
}
});
@@ -756,6 +772,10 @@ $(document).ready(function() {
expirationDateField.tipsy({gravity: 'n', fade: true});
expirationDateField.tipsy('show');
expirationDateField.addClass('error');
+ } else {
+ if (oc_appconfig.core.defaultExpireDateEnforced === 'no') {
+ $('#defaultExpireMessage'). hide('blind');
+ }
}
});
});
diff --git a/settings/css/settings.css b/settings/css/settings.css
index 5d8f9a7541..2056e567b3 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -132,7 +132,8 @@ table.grid td.date{
span.securitywarning {color:#C33; font-weight:bold; }
span.connectionwarning {color:#933; font-weight:bold; }
table.shareAPI td { padding-bottom: 0.8em; }
-table.shareAPI input#shareapi_expire_after_n_days {width: 25px;}
+table.shareAPI input#shareapiExpireAfterNDays {width: 25px;}
+table.shareAPI .indent { padding-left: 2em; }
#mail_settings p label:first-child {
display: inline-block;
diff --git a/settings/js/admin.js b/settings/js/admin.js
index c04c0505de..cd11e68442 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -31,6 +31,14 @@ $(document).ready(function(){
OC.AppConfig.setValue('core', $(this).attr('name'), value);
});
+ $('#shareapiDefaultExpireDate').change(function() {
+ $("#setDefaultExpireDate").toggleClass('hidden', !this.checked);
+ });
+
+ $('#allowLinks').change(function() {
+ $("#publicLinkSettings").toggleClass('hidden', !this.checked);
+ });
+
$('#security').change(function(){
$.post(OC.filePath('settings','ajax','setsecurity.php'), { enforceHTTPS: $('#forcessl').val() },function(){} );
});
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index d8a800ca20..4d453b0127 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -217,15 +217,31 @@ if (!$_['internetconnectionworking']) {
/>
t('Allow links'));?>
-
t('Allow users to share items to the public with links')); ?>
-
-
-
- >
+
+
+ t('Allow users to share items to the public with links')); ?>
+
+
+
@@ -255,22 +271,6 @@ if (!$_['internetconnectionworking']) {
-
- >
- />
- t('Set default expiration date'));?>
- t( 'Expire after ' )); ?>
- ' />
- t( 'days' )); ?>
- />
- t('Enforce expiration date'));?>
- t('Expire shares by default after N days')); ?>
-
-
-