Automation and api fixes
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<select class="input" name="devices[]" multiple>
|
||||
<?php foreach ($SUBDEVICES as $subDeviceKey => $subDeviceValue){
|
||||
if ($subDeviceValue['type'] != 'on/off') continue;?>
|
||||
<option value="<?php echo $subDeviceKey; ?>"><?php echo $subDeviceValue['name']; ?></option>
|
||||
<option value="<?php echo $subDeviceValue['masterDevice']; ?>"><?php echo $subDeviceValue['name']; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
|
@@ -4,7 +4,8 @@
|
||||
<h4 class="mb-4"><?php echo $LANG['t_createAutomation']?></h4>
|
||||
<form method="post">
|
||||
<div class="field">
|
||||
<input type="hidden" name="atSelector" value="<?php if (isset($_POST['atTime'])) {
|
||||
<input type="hidden" name="atSelector" value="<?php echo $_POST['atSelector']; ?>" required/>
|
||||
<input type="hidden" name="atSelectorValue" value="<?php if (isset($_POST['atTime'])) {
|
||||
echo $_POST['atTime'];
|
||||
} else if (isset($_POST['atDeviceValue'])) {
|
||||
$subDeviceId = $_POST['atDeviceValue'];
|
||||
|
@@ -91,7 +91,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="button" name="modalFinal" value="<?php echo $LANG['b_edit'];?>"/>
|
||||
<input type="submit" class="button is-danger" onClick="ajaxPost('ajax',{automation_id:'<?php echo $AUTOMATIONID ?>', 'action':'delete'}, this, true);" name="remove" value="<?php echo $LANG['b_remove'];?>"/>
|
||||
<input type="submit" class="button is-danger" onClick="ajaxPostSimple('ajax',{automation_id: '<?php echo $AUTOMATIONID ?>', action:'delete'}, true);" name="remove" value="<?php echo $LANG['b_remove'];?>"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
@@ -8,7 +8,7 @@ if ($SUBDEVICE['type'] == 'on/off') {
|
||||
|
||||
<div class="device-button col-4 col-sm-3 col-xl-2 square-wrap" <?php echo $action; ?> data-room-id="<?php echo $ROOMID; ?>">
|
||||
<div class="square">
|
||||
<div class="square-content <?php echo ($SUBDEVICE['comError'] ? "is-inactive" : "") ;?>" id="device-<?php echo $DEVICEID ?>" data-sub-device-id="<?php echo $SUBDEVICEID;?>">
|
||||
<div class="square-content <?php echo (($SUBDEVICE['comError'] == 1 || $DEVICE['approved'] == 0) ? "is-inactive" : "") ;?>" id="device-<?php echo $DEVICEID ?>" data-sub-device-id="<?php echo $SUBDEVICEID;?>">
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
Reference in New Issue
Block a user