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