Skip to content

Commit

Permalink
Set default expire date for share links to 7
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Beaupère <matthias.beaupere@gmail.com>
  • Loading branch information
Matthias Beaupère committed May 10, 2020
1 parent 10f62eb commit 372c8dc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/settings/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,24 @@ $(document).ready(function(){
value = 'no';
}
}
if ((this.id === 'shareapiExpireAfterNDays' || this.id === 'shareapiInternalExpireAfterNDays') && value === '') {
value = '7'
}
OCP.AppConfig.setValue('core', $(this).attr('name'), value);
});

$('#shareapiDefaultExpireDate').change(function() {
$("#setDefaultExpireDate").toggleClass('hidden', !this.checked);
if (this.checked) {
$('#shareapiExpireAfterNDays').trigger('change');
}
});

$('#shareapiDefaultInternalExpireDate').change(function() {
$("#setDefaultInternalExpireDate").toggleClass('hidden', !this.checked);
if (this.checked) {
$('#shareapiInternalExpireAfterNDays').trigger('change');
}
});

$('#publicShareDisclaimer').change(function() {
Expand Down

0 comments on commit 372c8dc

Please sign in to comment.