Browse Source

Repair room creation

master
Haitem 1 year ago
parent
commit
599ef47cd9
2 changed files with 6 additions and 1 deletions
  1. +5
    -0
      app/controls/setting.php
  2. +1
    -1
      app/templates/setting.phtml

+ 5
- 0
app/controls/setting.php View File

@ -13,6 +13,11 @@ if (isset($_POST) && !empty($_POST)){
UserManager::createUser($userName, $password);
header('Location: ' . BASEDIR . 'setting');
die();
} else if (isset($_POST['submitCreateRoom']) && $_POST['submitCreateRoom'] != "") {
$roomName = $_POST['roomName'];
RoomManager::create($roomName);
header('Location: ' . BASEDIR . 'setting');
die();
} else if (isset($_POST['submitEnableOta']) && $_POST['submitEnableOta'] != "") {
echo $otaCode = $_POST['otaCode'];
echo $otaSecret = $_POST['otaSecret'];

+ 1
- 1
app/templates/setting.phtml View File

@ -183,7 +183,7 @@
<input type="text" class="input" name="roomName" value="">
</div>
<div class="field">
<input type="submit" name="submitCreateUser" class="button" value="<?php $LANGMNG->echo('b_create') ?>">
<input type="submit" name="submitCreateRoom" class="button" value="<?php $LANGMNG->echo('b_create') ?>">
</div>
</form>
</div>

Loading…
Cancel
Save