diff --git a/app/controllers/deviceController.php b/app/controllers/deviceController.php index 1a928e2..3f89811 100644 --- a/app/controllers/deviceController.php +++ b/app/controllers/deviceController.php @@ -28,6 +28,9 @@ if (!empty ($_POST)){ if (!empty ($_POST['deviceName']) && !empty ($_POST['deviceId'])) { $deviceManager->edit ($_POST['deviceId'], array ('name' => $_POST['deviceName'])); } + if (!empty ($_POST['deviceApproved']) && !empty ($_POST['deviceId'])) { + $deviceManager->edit ($_POST['deviceId'], array ('approved' => $_POST['deviceApproved'])); + } if (isset ($_POST['deviceHistory']) && !empty ($_POST['deviceId'])) { $subDeviceManager->editSubDevicesByDevice($_POST['deviceId'], array ('history' => $_POST['deviceHistory'])); } diff --git a/app/views/templates/device.phtml b/app/views/templates/device.phtml index 4975c84..619f158 100644 --- a/app/views/templates/device.phtml +++ b/app/views/templates/device.phtml @@ -115,6 +115,8 @@ "> + +