1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

[address book] added check for invalid input when set group quota

This commit is contained in:
llj
2018-05-09 18:01:02 +08:00
parent c0c449db48
commit 266b6330b1
2 changed files with 10 additions and 0 deletions

View File

@@ -68,12 +68,18 @@ define([
var $error = $('.error', $form);
var $submitBtn = $('[type="submit"]', $form);
var quota = $.trim($('[name="quota"]', $form).val());
var quota_int = parseInt(quota);
if (!quota) {
$error.html(gettext("It is required.")).show();
return false;
}
if (!(quota_int == quota &&
(quota_int > 0 || quota_int == -2))) {
return false;
}
Common.disableButton($submitBtn);
$.ajax({
url: Common.getUrl({