0 is a prefectly valid PreEventCount

This commit is contained in:
Isaac Connor 2017-11-05 10:00:24 -05:00
parent 0a3327e2d2
commit 7374ced076
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ function validateForm( form ) {
errors[errors.length] = "<?php echo translate('BadImageBufferCount') ?>"; errors[errors.length] = "<?php echo translate('BadImageBufferCount') ?>";
if ( !form.elements['newMonitor[WarmupCount]'].value || !(parseInt(form.elements['newMonitor[WarmupCount]'].value) >= 0 ) ) if ( !form.elements['newMonitor[WarmupCount]'].value || !(parseInt(form.elements['newMonitor[WarmupCount]'].value) >= 0 ) )
errors[errors.length] = "<?php echo translate('BadWarmupCount') ?>"; errors[errors.length] = "<?php echo translate('BadWarmupCount') ?>";
if ( !form.elements['newMonitor[PreEventCount]'].value || !(parseInt(form.elements['newMonitor[PreEventCount]'].value) > 0 ) || (parseInt(form.elements['newMonitor[PreEventCount]'].value) > parseInt(form.elements['newMonitor[ImageBufferCount]'].value)) ) if ( !form.elements['newMonitor[PreEventCount]'].value || !(parseInt(form.elements['newMonitor[PreEventCount]'].value) >= 0 ) || (parseInt(form.elements['newMonitor[PreEventCount]'].value) > parseInt(form.elements['newMonitor[ImageBufferCount]'].value)) )
errors[errors.length] = "<?php echo translate('BadPreEventCount') ?>"; errors[errors.length] = "<?php echo translate('BadPreEventCount') ?>";
if ( !form.elements['newMonitor[PostEventCount]'].value || !(parseInt(form.elements['newMonitor[PostEventCount]'].value) >= 0 ) ) if ( !form.elements['newMonitor[PostEventCount]'].value || !(parseInt(form.elements['newMonitor[PostEventCount]'].value) >= 0 ) )
errors[errors.length] = "<?php echo translate('BadPostEventCount') ?>"; errors[errors.length] = "<?php echo translate('BadPostEventCount') ?>";