Set default expire date for share links to 7

Signed-off-by: Matthias Beaupère <matthias.beaupere@gmail.com>
This commit is contained in:
Matthias Beaupère 2020-05-11 00:18:32 +02:00
parent 10f62eb2a4
commit 372c8dc0c2
1 changed files with 9 additions and 0 deletions

View File

@ -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() {