Merge pull request #3240 from connortechnology/fix_3237

fix warnings not being displayed
This commit is contained in:
Isaac Connor 2021-05-18 10:53:16 -04:00 committed by Isaac Connor
parent e864d00e9a
commit f6a271c90d
1 changed files with 2 additions and 2 deletions

View File

@ -45,6 +45,7 @@ rtspStreamNames[\''.validJsStr($row['RTSPStreamName']).'\'] = true;
function validateForm( form ) {
var errors = new Array();
var warnings = new Array();
if ( form.elements['newMonitor[Name]'].value.search( /[^\w\-\.\(\)\:\/ ]/ ) >= 0 )
errors[errors.length] = "<?php echo translate('BadNameChars') ?>";
@ -162,7 +163,6 @@ function validateForm( form ) {
return false;
}
var warnings = new Array();
if ( (form.elements['newMonitor[Function]'].value != 'Monitor') && (form.elements['newMonitor[Function]'].value != 'None') ) {
if ( (form.elements['newMonitor[SaveJPEGs]'].value == '0') && (form.elements['newMonitor[VideoWriter]'].value == '0') ) {
warnings[warnings.length] = "<?php echo translate('BadNoSaveJPEGsOrVideoWriter'); ?>";