Merge pull request #13949 from rullzer/no_negative_expire

Do not allow invalid default expire days
This commit is contained in:
Vincent Petry 2015-08-07 17:33:30 +02:00
commit cf532247e0
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() { $('#shareAPI input:not(#excludedGroups)').change(function() {
var value = $(this).val(); var value = $(this).val();
if ($(this).attr('type') === 'checkbox') { if ($(this).attr('type') === 'checkbox') {