Add approve changer in actions in device list
This commit is contained in:
parent
fe1247fdaf
commit
5f03295ad3
@ -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']));
|
||||
}
|
||||
|
@ -115,6 +115,8 @@
|
||||
<input type="hidden" name="deviceId" value="<?php echo (!empty($device['device_id']) ? $device['device_id'] : ""); ?>">
|
||||
<button class="fa custom-file-input" <?php echo (!empty($device['command']) && $device['command'] == "reset" ? "style=\"color:red;\"" : ""); ?> type="submit" name="deviceCommand" value="reset" title="Reset"></button>
|
||||
<button class="fa custom-file-input" <?php echo (!empty($device['command']) && $device['command'] == "config" ? "style=\"color:red;\"" : ""); ?> type="submit" name="deviceCommand" value="config" title="Config"></button>
|
||||
<button class="fas fa custom-file-input" <?php echo (!empty($device['approved']) && $device['approved'] == 1 ? "style=\"color:Green;\"" : ""); ?> type="submit" name="deviceApproved" value="1" title="Approved"></button>
|
||||
<button class="fas fa custom-file-input" <?php echo (!empty($device['approved']) && $device['approved'] == 2 ? "style=\"color:red;\"" : ""); ?> type="submit" name="deviceApproved" value="2" title="Blocked"></button>
|
||||
<div style="float: clear;"></div>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user