PHP_SMART_HOME_V3/templates/part/automationCreate.phtml

85 lines
4.9 KiB
PHTML

<div class="modal-container modal-container-hiden" id="modal">
<div class="modal">
<a href=""><i class="fa fa-times close"></i></a>
<h4 class="mb-4"><?php echo $LANG['t_createAutomation']?></h4>
<form method="post">
<div class="field">
<div class="label"><?php echo $LANG['l_runAt']?></div>
<div class="field">
<select class="input" name="atSelector" id="valueSelector" required>
<option value="sunSet"><?php echo $LANG['l_sunSet']?></option>
<option value="sunRise"><?php echo $LANG['l_sunRice']?></option>
<option value="inHome"><?php echo $LANG['l_inHome']?></option>
<option value="outHome"><?php echo $LANG['l_outHome']?></option>
<option value="time"><?php echo $LANG['l_time']?></option>
<option value="atDeviceValue"><?php echo $LANG['l_deviceValue']?></option>
</select>
<input class="input" type="time" name="atTime" id="atTime" disabled/>
<select class="input" name="atDeviceValue" id="atDeviceValue" disabled>
<?php foreach ($SUBDEVICES as $subDeviceKey => $subDeviceValue){ ?>
<option value="<?php echo $subDeviceKey; ?>"><?php echo $subDeviceValue['name']; ?>[<?php echo $subDeviceValue['type']; ?>]</option>
<?php } ?>
</select>
=
<input class="input" type="num" name="atDeviceValueInt" id="atDeviceValueInt" required disabled/>
</div>
<div class="label"><?php echo $LANG['l_resetAt']?></div>
<div class="field">
<select class="input" name="restartAtSelector" id="valueSelector" required>
<option value="sunSet"><?php echo $LANG['l_sunSet']?></option>
<option value="sunRise"><?php echo $LANG['l_sunRice']?></option>
<option value="inHome"><?php echo $LANG['l_inHome']?></option>
<option value="outHome"><?php echo $LANG['l_outHome']?></option>
<option value="time"><?php echo $LANG['l_time']?></option>
<option value="atDeviceValue"><?php echo $LANG['l_deviceValue']?></option>
</select>
<input class="input" type="time" name="restartAtTime" id="atTime" disabled/>
<select class="input" name="restartAtDeviceValue" id="atDeviceValue" disabled>
<?php foreach ($SUBDEVICES as $subDeviceKey => $subDeviceValue){ ?>
<option value="<?php echo $subDeviceKey; ?>"><?php echo $subDeviceValue['name']; ?>[<?php echo $subDeviceValue['type']; ?>]</option>
<?php } ?>
</select>
=
<input class="input" type="num" name="restartAtDeviceValueInt" id="atDeviceValueInt" required disabled/>
</div>
<div class="label"><?php echo $LANG['l_affectedDevices']?></div>
<div class="field">
<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>
<?php } ?>
</select>
</div>
<div class="label"><?php echo $LANG['l_atDays']?></div>
<div class="field">
<input type="checkbox" name="day[]" value="mon"/> Pondělí
</div>
<div class="field">
<input type="checkbox" name="day[]" value="tue"/> Úterý
</div>
<div class="field">
<input type="checkbox" name="day[]" value="wed"/> Středa
</div>
<div class="field">
<input type="checkbox" name="day[]" value="thu"/> Čtvrtek
</div>
<div class="field">
<input type="checkbox" name="day[]" value="fri"/> Pátek
</div>
<div class="field">
<input type="checkbox" name="day[]" value="sat"/> Sobota
</div>
<div class="field">
<input type="checkbox" name="day[]" value="sun"/> Neděle
</div>
</div>
<input type="submit" class="button" name="modalNext" value="<?php echo $LANG['b_next']?>"/>
</form>
</div>
</div>