Browse Source

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.
remotes/origin/handlebars-approach
Roeland Jago Douma 12 years ago
parent
commit
15a0f8e433
  1. 7
      settings/js/admin.js

7
settings/js/admin.js

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

Loading…
Cancel
Save