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:
@@ -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({
|
||||
|
Reference in New Issue
Block a user