summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-04-23 12:50:24 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-04-24 13:34:31 +0200
commit6650be99136bbeecc39a28cbe9c22de0c5cf08ac (patch)
tree169e3a0eb7ce95878ddc89387cfd948a53586040 /settings
parent8127e984bdd56d53279d720d2cf0b5504633c375 (diff)
downloadnextcloud-server-6650be99136bbeecc39a28cbe9c22de0c5cf08ac.tar.gz
nextcloud-server-6650be99136bbeecc39a28cbe9c22de0c5cf08ac.zip
add setting to set default expire date
Diffstat (limited to 'settings')
-rwxr-xr-xsettings/admin.php4
-rw-r--r--settings/css/settings.css1
-rw-r--r--settings/templates/admin.php19
3 files changed, 23 insertions, 1 deletions
diff --git a/settings/admin.php b/settings/admin.php
index bce18b7cf6a..49dde59ce2a 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -45,6 +45,10 @@ $tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundj
$tmpl->assign('cron_log', OC_Config::getValue('cron_log', true));
$tmpl->assign('lastcron', OC_Appconfig::getValue('core', 'lastcron', false));
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
+$tmpl->assign('shareDefaultExpireDateSet', OC_Appconfig::getValue('core', 'shareapi_default_expire_date', 'no'));
+$tmpl->assign('shareExpireAfterNDays', OC_Appconfig::getValue('core', 'shareapi_expire_after_n_days', '7'));
+$tmpl->assign('shareEnforceExpireDate', OC_Appconfig::getValue('core', 'shareapi_enforce_expire_date', 'no'));
+
// Check if connected using HTTPS
if (OC_Request::serverProtocol() === 'https') {
diff --git a/settings/css/settings.css b/settings/css/settings.css
index a7680aad948..5d8f9a7541c 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -132,6 +132,7 @@ 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;}
#mail_settings p label:first-child {
display: inline-block;
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 07b5ee7860e..8eb1beb9566 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -254,6 +254,23 @@ if (!$_['internetconnectionworking']) {
<em><?php p($l->t('Allow users to send mail notification for shared files')); ?></em>
</td>
</tr>
+
+ <tr>
+ <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('class="hidden"');?>>
+ <input type="checkbox" name="shareapi_default_expire_date" id="shareapi_default_expire_date"
+ value="1" <?php if ($_['shareDefaultExpireDateSet'] == 'yes') print_unescaped('checked="checked"'); ?> />
+ <label for="shareapi_default_expire_date"><?php p($l->t('Set default expire date'));?></label><br/>
+ <?php p($l->t( 'Expire after ' )); ?>
+ <input type="text" name='shareapi_expire_after_n_days' id="shareapi_expire_after_n_days" placeholder="<?php p('7')?>"
+ value='<?php p($_['shareExpireAfterNDays']) ?>' />
+ <?php p($l->t( 'days' )); ?>
+ <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapi_enforce_expire_date"
+ value="1" <?php if ($_['shareEnforceExpireDate'] == 'yes') print_unescaped('checked="checked"'); ?> />
+ <label for="shareapi_enforce_expire_date"><?php p($l->t('Enforce expire date'));?></label><br/>
+ <em><?php p($l->t('Expire shares by default after N days')); ?></em>
+ </td>
+ </tr>
+
</table>
</div>
@@ -296,7 +313,7 @@ if (!$_['internetconnectionworking']) {
<p><?php p($l->t('This is used for sending out notifications.')); ?></p>
<p>
- <label for="mail_smtpmode"><?php p($l->t( 'Send mode' )); ?></label>
+ <label for="mail_smtpmode"><?php p($l->t( 'Send mode' )); ?></label>
<select name='mail_smtpmode' id='mail_smtpmode'>
<?php foreach ($mail_smtpmode as $smtpmode):
$selected = '';