diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index d7d176b45..4b7d0cd26 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -323,6 +323,7 @@ $SLANG = array( 'DoNativeMotionDetection'=> 'Do Native Motion Detection', 'Download' => 'Download', 'DuplicateMonitorName' => 'Duplicate Monitor Name', + 'DuplicateRTSPStreamName' => 'Duplicate RTSP Stream Name', 'Duration' => 'Duration', 'Edit' => 'Edit', 'EditControl' => 'Edit Control', diff --git a/web/skins/classic/views/js/monitor.js.php b/web/skins/classic/views/js/monitor.js.php index d090a0ee9..de74e8d56 100644 --- a/web/skins/classic/views/js/monitor.js.php +++ b/web/skins/classic/views/js/monitor.js.php @@ -28,12 +28,16 @@ controlOptions['.$control->Id().'][0] = '. ?> var monitorNames = new Object(); +var rtspStreamNames = new Object(); '; } @@ -145,9 +147,14 @@ console.log("encoding value" + parameters); errors[errors.length] = ""; if ( !form.elements['newMonitor[WebColour]'].value || !form.elements['newMonitor[WebColour]'].value.match( /^[#0-9a-zA-Z]+$/ ) ) errors[errors.length] = ""; - } + if ( form.elements['newMonitor[RTSPStreamName]'].value + && + rtspStreamNames[form.elements['newMonitor[RTSPStreamName]'].value] + ) + errors[errors.length] = ""; + if ( errors.length ) { alert(errors.join("\n")); return false;