Merge pull request #1327 from nextcloud/set-quota-non-int-10

[10] fix setting quota to default or unlimited
This commit is contained in:
Morris Jobke 2016-09-08 15:32:42 +02:00 committed by GitHub
commit 30a24b49f5
1 changed files with 1 additions and 1 deletions

View File

@ -524,7 +524,7 @@ var UserList = {
if (quota === 'other') { if (quota === 'other') {
return; return;
} }
if (isNaN(parseInt(quota, 10)) || parseInt(quota, 10) < 0) { if ((quota !== 'default' && quota !=="none") && (isNaN(parseInt(quota, 10)) || parseInt(quota, 10) < 0)) {
// the select component has added the bogus value, delete it again // the select component has added the bogus value, delete it again
$select.find('option[selected]').remove(); $select.find('option[selected]').remove();
OC.Notification.showTemporary(t('core', 'Invalid quota value "{val}"', {val: quota})); OC.Notification.showTemporary(t('core', 'Invalid quota value "{val}"', {val: quota}));