Allow spaces in monitor names

This commit is contained in:
Robin Daermann 2016-03-24 14:37:24 +01:00
parent 51a4298fc7
commit 71db9b84e6
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ function validateForm( form )
{ {
var errors = new Array(); var errors = new Array();
if ( form.elements['newMonitor[Name]'].value.search( /[^\w-]/ ) >= 0 ) if ( form.elements['newMonitor[Name]'].value.search( /[^\w- ]/ ) >= 0 )
errors[errors.length] = "<?php echo translate('BadNameChars') ?>"; errors[errors.length] = "<?php echo translate('BadNameChars') ?>";
else if ( form.elements.mid.value == 0 && monitorNames[form.elements['newMonitor[Name]'].value] ) else if ( form.elements.mid.value == 0 && monitorNames[form.elements['newMonitor[Name]'].value] )
errors[errors.length] = "<?php echo translate('DuplicateMonitorName') ?>"; errors[errors.length] = "<?php echo translate('DuplicateMonitorName') ?>";