diff --git a/html/forms/sensor-alert-update.inc.php b/html/forms/sensor-alert-update.inc.php index aa0266fa1b..91a5b9aecc 100644 --- a/html/forms/sensor-alert-update.inc.php +++ b/html/forms/sensor-alert-update.inc.php @@ -14,6 +14,10 @@ // FUA +if (isset($_POST['sub_type']) && !empty($_POST['sub_type'])) { + dbUpdate(array('sensor_custom' => 'No'), 'sensors', '`sensor_id` = ?', array($_POST['sensor_id'])); +} else { + if(!is_numeric($_POST['device_id']) || !is_numeric($_POST['sensor_id'])) { echo('error with data'); @@ -45,4 +49,5 @@ else exit; } } +} diff --git a/html/pages/device/edit/health.inc.php b/html/pages/device/edit/health.inc.php index 96d6131f15..3d7d213527 100644 --- a/html/pages/device/edit/health.inc.php +++ b/html/pages/device/edit/health.inc.php @@ -27,6 +27,7 @@ High Low Alerts + '.$sensor['sensor_class'].' @@ -61,6 +67,9 @@ foreach ( dbFetchRows("SELECT * FROM sensors WHERE device_id = ? AND sensor_dele + + Clear custom + '); } @@ -134,8 +143,7 @@ foreach($rollback as $reset_data) } }); }); - -