Skip to content

Commit

Permalink
Set 7 days as default sharing expire date on settings view
Browse files Browse the repository at this point in the history
When user ticks the "Set default expiration date for link shares" and
there is no value already given, this patch sets a default value to 7
on the view and sends an update to the server
  • Loading branch information
Matthias Beaupère committed May 9, 2020
1 parent deb68c6 commit 21fa87f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 3rdparty
5 changes: 5 additions & 0 deletions apps/settings/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ $(document).ready(function(){

$('#shareapiDefaultExpireDate').change(function() {
$("#setDefaultExpireDate").toggleClass('hidden', !this.checked);
var expire_field = $('#shareapiExpireAfterNDays')
if(this.checked && expire_field.val() === '') {
expire_field.val(7)
expire_field.trigger('change')
}
});

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

0 comments on commit 21fa87f

Please sign in to comment.