PHP_SMART_HOME_V3/app/templates/part/sceneEdit.phtml

47 lines
3.4 KiB
PHTML
Raw Permalink Normal View History

2019-08-23 11:39:42 +00:00
<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>
2019-10-13 08:07:51 +00:00
<h4 class="mb-4"><?php $LANGMNG->echo('t_editScene')?></h4>
2019-08-23 11:39:42 +00:00
<form method="post">
<div class="field">
2019-10-13 08:07:51 +00:00
<div class="label"><?php $LANGMNG->echo('w_title');?>:</div>
2019-08-23 11:39:42 +00:00
<input type="text" class="input" name="sceneName" value="<?php echo $SCENE['name']; ?>"/>
</div>
<div class="field">
2019-10-13 08:07:51 +00:00
<div class="label"><?php $LANGMNG->echo('w_icon');?>:</div>
2019-08-23 11:39:42 +00:00
<select class="input fa" name="sceneIcon">
2019-10-13 08:07:51 +00:00
<option value=""><?php $LANGMNG->echo('w_no').$LANGMNG->get('w_icon');?></option>
2019-08-23 11:39:42 +00:00
<option value="f0eb" <?php ECHO ($SCENE['icon'] == "f0eb" ? 'selected="selected"' : ''); ?>>&#xf0eb; - fa-lightbulb-o</option>
<option value="f2dc" <?php ECHO ($SCENE['icon'] == "f2dc" ? 'selected="selected"' : ''); ?>>&#xf2dc; - fa-snowflake-o</option>
<option value="f0e7" <?php ECHO ($SCENE['icon'] == "f0e7" ? 'selected="selected"' : ''); ?>>&#xf0e7; - fa-bolt</option>
<option value="f2c7" <?php ECHO ($SCENE['icon'] == "f2c7" ? 'selected="selected"' : ''); ?>>&#xf2c7; - fa-thermometer-full</option>
<option value="f236" <?php ECHO ($SCENE['icon'] == "f236" ? 'selected="selected"' : ''); ?>>&#xf236; - fa-bed</option>
<option value="f185" <?php ECHO ($SCENE['icon'] == "f185" ? 'selected="selected"' : ''); ?>>&#xf185; - fa-sun-o</option>
<option value="f2db" <?php ECHO ($SCENE['icon'] == "f2db" ? 'selected="selected"' : ''); ?>>&#xf2db; - fa-microchip</option>
<option value="f011" <?php ECHO ($SCENE['icon'] == "f011" ? 'selected="selected"' : ''); ?>>&#xf011; - fa-power-off</option>
<option value="f011" <?php ECHO ($SCENE['icon'] == "f011" ? 'selected="selected"' : ''); ?>>&#xf108; - 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; ?>">&#xf1f8;</button>
</div>
<?php
$i++;
} ?>
</div>
2019-10-13 08:07:51 +00:00
<input type="submit" class="button" name="saveDevice" value="<?php $LANGMNG->echo('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 $LANGMNG->echo('b_remove');?>"/>
2019-08-23 11:39:42 +00:00
</form>
</div>
</div>