Do not allow invalid default expire days

Currently it is possible to set a negative number of days in which a
public share expires. This results in public sharing not working and it
undesired.

Weird thing is that the API still lets you create shares and gives back
an URL. However the id is "unkown" and the URL invalid.
This commit is contained in:
Roeland Jago Douma 2015-02-06 16:27:42 +01:00
parent 7959605e4e
commit 15a0f8e433
1 changed files with 7 additions and 0 deletions

View File

@ -85,6 +85,13 @@ $(document).ready(function(){
});
});
$('#shareapiExpireAfterNDays').change(function() {
var value = $(this).val();
if (value <= 0) {
$(this).val("1");
}
});
$('#shareAPI input:not(#excludedGroups)').change(function() {
var value = $(this).val();
if ($(this).attr('type') === 'checkbox') {