Scene creadtion devices cant be empty
This commit is contained in:
parent
2f838a529c
commit
8d02d7ff9e
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (isset($_POST) && !empty($_POST)){
|
if (isset($_POST) && !empty($_POST)){
|
||||||
|
if (sset($_POST['devices']) && $_POST['devices'] != '') {
|
||||||
SceneManager::create($_POST['sceneIcon'], $_POST['sceneName'], json_encode($_POST['devices']));
|
SceneManager::create($_POST['sceneIcon'], $_POST['sceneName'], json_encode($_POST['devices']));
|
||||||
|
}
|
||||||
|
|
||||||
//Debug
|
//Debug
|
||||||
if (DEBUGMOD == 1) {
|
if (DEBUGMOD == 1) {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="label"><?php $LANGMNG->echo('l_choseDevice');?></div>
|
<div class="label"><?php $LANGMNG->echo('l_choseDevice');?></div>
|
||||||
<select class="input" name="devices[]" multiple>
|
<select class="input" name="devices[]" multiple required>
|
||||||
<?php
|
<?php
|
||||||
foreach ($SUBDEVICES as $subdeviceId => $subdeviceData) {
|
foreach ($SUBDEVICES as $subdeviceId => $subdeviceData) {
|
||||||
echo '<option value="'.$subdeviceId.'">'.$subdeviceData['name'].'</option>';
|
echo '<option value="'.$subdeviceId.'">'.$subdeviceData['name'].'</option>';
|
||||||
|
Loading…
Reference in New Issue
Block a user