1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php /** Created by Anton on 04.02.2020. */
- $query = new \yii\db\Query();
- $tmcTypes = \app\models\entity\TmcType::find()->all();
- $query = new \yii\db\Query();
- $tmcStorages = $query
- ->select('id, title')
- ->from(\app\models\entity\Storage::tableName())
- ->where(['tmc' => 0])
- ->all()
- ;
- ?>
- <div class="divContentScroll loco-scrol-blue">
- <div id="contentBox" class="contentBox">
- <p class="crumbs">Список устройств » Новое устройство</p>
- <h2 class="contentHeader">Введите данные нового устройства</h2>
- <form action="/tmc/api/add_tmc.php" method="post">
- <input type="hidden" name="_csrf" value="">
- <fieldset>
- Вид устройства:
- <select class="" name="tmcType">
- <?php foreach ($tmcTypes as $type): ?>
- <option value="<?= $type['id'] ?>"><?= $type['title'] ?></option>
- <?php endforeach; ?>
- </select>
- <br clear="all">
- Инвентарный номер:
- <br>
- <input name="inventoryNum" type="text" placeholder="Введете инвентарный номер">
- <br>
- IP:
- <br>
- <input name="ip" type="text" placeholder="Введете зарезервированный IP">
- <br>
- MAC-адрес:
- <br>
- <input name="mac" type="text" placeholder="Введете MAC-адрес">
- <br>
- Место хранения:
- <select class="" name="storage">
- <?php foreach ($tmcStorages as $storage): ?>
- <option value="<?= $storage['id'] ?>"><?= $storage['title'] ?></option>
- <?php endforeach; ?>
- </select>
- <br clear="all">
- Примечание:<br>
- <textarea placeholder="Описание" name="desc"></textarea>
- <input type="hidden" name="company" value="<?= $companyID ?>">
- </fieldset>
- <button type="submit" class="">Добавить устройство</button>
- </form>
- </div>
- </div>
|