BadEncoder Params and PathNotEncoded are warnings, not errors

This commit is contained in:
Isaac Connor 2021-05-06 10:55:16 -04:00
parent 442f126193
commit 373fae2511
1 changed files with 2 additions and 4 deletions

View File

@ -75,9 +75,7 @@ function validateForm( form ) {
if ( !form.elements['newMonitor[Path]'].value ) {
errors[errors.length] = "<?php echo translate('BadPath') ?>";
} else if ( form.elements['newMonitor[Path]'].value.match( /[\!\*'\(\)\$ ,#\[\]]/) ) {
errors[errors.length] = "<?php echo translate('BadPathNotEncoded') ?>";
} else {
console.log("valid" + form.elements['newMonitor[Path]'].value);
warnings[warnings.length] = "<?php echo translate('BadPathNotEncoded') ?>";
}
} else if ( form.elements['newMonitor[Type]'].value == 'File' ) {
@ -95,7 +93,7 @@ console.log("valid" + form.elements['newMonitor[Path]'].value);
if (form.elements['newMonitor[VideoWriter]'].value == '1' /* Encode */) {
var parameters = form.elements['newMonitor[EncoderParameters]'].value.replace(/[^#a-zA-Z]/g, "");
if (parameters == '' || parameters == '#Linesbeginningwith#areacomment#Forchangingqualityusethecrfoption#isbestisworstquality#crf' ) {
errors[errors.length] = '<?php echo translate('BadEncoderParameters') ?>';
warnings[warnings.length] = '<?php echo translate('BadEncoderParameters') ?>';
}
}