diff --git a/web/includes/actions/monitor.php b/web/includes/actions/monitor.php index 50f0c20c1..b1a7d4726 100644 --- a/web/includes/actions/monitor.php +++ b/web/includes/actions/monitor.php @@ -24,7 +24,7 @@ if ( ! canEdit('Monitors') ) { return; } -if ( $action == 'monitor' ) { +if ( $action == 'save' ) { $mid = 0; if ( !empty($_REQUEST['mid']) ) { $mid = validInt($_REQUEST['mid']); diff --git a/web/skins/classic/views/js/monitor.js b/web/skins/classic/views/js/monitor.js index b9f37c090..5edc3d0e1 100644 --- a/web/skins/classic/views/js/monitor.js +++ b/web/skins/classic/views/js/monitor.js @@ -137,6 +137,13 @@ function initPage() { document.querySelectorAll('input[name="newMonitor[WebColour]"]').forEach(function(el) { el.onchange = window['change_WebColour'].bind(el); }); + document.querySelectorAll('select[name="newMonitor[Type]"]').forEach(function(el) { + el.onchange = function() { + var form = document.getElementById('contentForm'); + form.tab.value = 'general'; + form.submit(); + }; + }); $j('.chosen').chosen(); diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 805769eb1..7f6abf791 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -460,9 +460,8 @@ if ( canEdit('Monitors') ) {