Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove confusing placeholder in Sharing Settings #20605

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we have an available value for this somewhere? Hardcoded numbers like those should be avoided

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, however I couldn't find any constant for this. Do you have any pointer on where to add this ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed this comment.
Maybe in the capabilities?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthiasbe any update here? :)

}
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