48 lines
3.4 KiB
PHTML
48 lines
3.4 KiB
PHTML
<?php //TODO DOD2LAT UKL8D8N9?>
|
|
<div class="modal-container modal-container-hiden" id="modal-setting-<?php echo $SCENEID ?>">
|
|
<div class="modal">
|
|
<div class="close">
|
|
<i class="fa fa-times"></i>
|
|
</div>
|
|
<h4 class="mb-4"><?php echo $LANG['t_editScene']?></h4>
|
|
<form method="post">
|
|
<div class="field">
|
|
<div class="label"><?php echo $LANG['w_title'];?>:</div>
|
|
<input type="text" class="input" name="sceneName" value="<?php echo $SCENE['name']; ?>"/>
|
|
</div>
|
|
<div class="field">
|
|
<div class="label"><?php echo $LANG['w_icon'];?>:</div>
|
|
<select class="input fa" name="sceneIcon">
|
|
<option value=""><?php echo $LANG['w_no'].$LANG['w_icon'];?></option>
|
|
<option value="f0eb" <?php ECHO ($SCENE['icon'] == "f0eb" ? 'selected="selected"' : ''); ?>> - fa-lightbulb-o</option>
|
|
<option value="f2dc" <?php ECHO ($SCENE['icon'] == "f2dc" ? 'selected="selected"' : ''); ?>> - fa-snowflake-o</option>
|
|
<option value="f0e7" <?php ECHO ($SCENE['icon'] == "f0e7" ? 'selected="selected"' : ''); ?>> - fa-bolt</option>
|
|
<option value="f2c7" <?php ECHO ($SCENE['icon'] == "f2c7" ? 'selected="selected"' : ''); ?>> - fa-thermometer-full</option>
|
|
<option value="f236" <?php ECHO ($SCENE['icon'] == "f236" ? 'selected="selected"' : ''); ?>> - fa-bed</option>
|
|
<option value="f185" <?php ECHO ($SCENE['icon'] == "f185" ? 'selected="selected"' : ''); ?>> - fa-sun-o</option>
|
|
<option value="f2db" <?php ECHO ($SCENE['icon'] == "f2db" ? 'selected="selected"' : ''); ?>> - fa-microchip</option>
|
|
<option value="f011" <?php ECHO ($SCENE['icon'] == "f011" ? 'selected="selected"' : ''); ?>> - fa-power-off</option>
|
|
<option value="f011" <?php ECHO ($SCENE['icon'] == "f011" ? 'selected="selected"' : ''); ?>> - fa-desktop</option>
|
|
</select>
|
|
</div>
|
|
<div class="field px-2">
|
|
<?php
|
|
$i = 0;
|
|
foreach($SCENE['doSomething'] as $subDeviceId => $subDeviceData){ ?>
|
|
<div id="scene-<?php echo $SCENEID; ?>-content">
|
|
<div class="label"><?php echo $subDeviceData['name']; ?></div>
|
|
<select class="input" name="devices[<?php echo $subDeviceId; ?>]">
|
|
<option value="0" <?php ECHO ($subDeviceData['state'] == "0" ? 'selected="selected"' : ''); ?>>off</option>
|
|
<option value="1" <?php ECHO ($subDeviceData['state'] == "1" ? 'selected="selected"' : ''); ?>>on</option>
|
|
</select>
|
|
<button name="remove" type="button" class="button is-danger fa" data-scene-id="<?php echo $SCENEID; ?>"></button>
|
|
</div>
|
|
<?php
|
|
$i++;
|
|
} ?>
|
|
</div>
|
|
<input type="submit" class="button" name="saveDevice" value="<?php echo $LANG['b_edit'];?>"/>
|
|
<input type="button" class="button is-danger" onClick="ajaxPost('ajax',{scene_id:'<?php echo $SCENEID ?>', 'action':'delete'}, this, true);" name="saveDevice" value="<?php echo $LANG['b_remove'];?>"/>
|
|
</form>
|
|
</div>
|
|
</div>
|