diff --git a/web/zm.php b/web/zm.php index 59232c4ed..150df428e 100644 --- a/web/zm.php +++ b/web/zm.php @@ -1183,6 +1183,7 @@ opener.location.reload(); window.focus(); function validateForm(theForm) { + theForm.new_alarm_rgb.value = (theForm.new_alarm_rgb_r.value<<16)|(theForm.new_alarm_rgb_g.value<<8)|theForm.new_alarm_rgb_b.value; return( true ); } @@ -1190,8 +1191,12 @@ function applyZoneType(theForm) { if ( theForm.new_type.value == 'Inactive' ) { - theForm.new_alarm_rgb.disabled = true; - theForm.new_alarm_rgb.value = ""; + theForm.new_alarm_rgb_r.disabled = true; + theForm.new_alarm_rgb_r.value = ""; + theForm.new_alarm_rgb_g.disabled = true; + theForm.new_alarm_rgb_g.value = ""; + theForm.new_alarm_rgb_b.disabled = true; + theForm.new_alarm_rgb_b.value = ""; theForm.new_alarm_threshold.disabled = true; theForm.new_alarm_threshold.value = ""; theForm.new_min_alarm_pixels.disabled = true; @@ -1217,30 +1222,34 @@ function applyZoneType(theForm) } else { - theForm.new_alarm_rgb.disabled = false; - theForm.new_alarm_rgb.value = ; + theForm.new_alarm_rgb_r.disabled = false; + theForm.new_alarm_rgb_r.value = ">16)&0xff; ?>"; + theForm.new_alarm_rgb_g.disabled = false; + theForm.new_alarm_rgb_g.value = ">8)&0xff; ?>"; + theForm.new_alarm_rgb_b.disabled = false; + theForm.new_alarm_rgb_b.value = ""; theForm.new_alarm_threshold.disabled = false; - theForm.new_alarm_threshold.value = ; + theForm.new_alarm_threshold.value = ""; theForm.new_min_alarm_pixels.disabled = false; - theForm.new_min_alarm_pixels.value = ; + theForm.new_min_alarm_pixels.value = ""; theForm.new_max_alarm_pixels.disabled = false; - theForm.new_max_alarm_pixels.value = ; + theForm.new_max_alarm_pixels.value = ""; theForm.new_filter_x.disabled = false; - theForm.new_filter_x.value = ; + theForm.new_filter_x.value = ""; theForm.new_filter_y.disabled = false; - theForm.new_filter_y.value = ; + theForm.new_filter_y.value = ""; theForm.new_min_filter_pixels.disabled = false; - theForm.new_min_filter_pixels.value = ; + theForm.new_min_filter_pixels.value = ""; theForm.new_max_filter_pixels.disabled = false; - theForm.new_max_filter_pixels.value = ; + theForm.new_max_filter_pixels.value = ""; theForm.new_min_blob_pixels.disabled = false; - theForm.new_min_blob_pixels.value = ; + theForm.new_min_blob_pixels.value = ""; theForm.new_max_blob_pixels.disabled = false; - theForm.new_max_blob_pixels.value = ; + theForm.new_max_blob_pixels.value = ""; theForm.new_min_blobs.disabled = false; - theForm.new_min_blobs.value = ; + theForm.new_min_blobs.value = ""; theForm.new_max_blobs.disabled = false; - theForm.new_max_blobs.value = ; + theForm.new_max_blobs.value = ""; } } @@ -1337,6 +1346,7 @@ function closeWindow() { +