Device network setting part 1

This commit is contained in:
JonatanRek 2019-11-27 19:48:59 +01:00
parent 0045d00abc
commit e0ee40cb0d

View File

@ -62,15 +62,22 @@
<div class="label">Token:</div> <div class="label">Token:</div>
<input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['token']; ?>" disabled> <input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['token']; ?>" disabled>
</div> </div>
<?php //TODO: firmware tipe send to api?> <h4 class="mb-4"><?php $LANGMNG->echo('t_networkSetting'); ?></h4>
<div class="field"> <div class="field">
<div class="label">Type:</div> <div class="label">Type:</div>
<input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['type']; ?>" disabled> <input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['type']; ?>" disabled>
</div> </div>
<?php //TODO: add Static Ip Functionality?>
<div class="field"> <div class="field">
<div class="label">IP:</div> <div class="label">IP:</div>
<input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['ip']; ?>" disabled> <input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['ip']; ?>" minlength="7" maxlength="15" size="15" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" disabled>
</div>
<div class="field">
<div class="label">Subnet:</div>
<input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['subnet']; ?>" minlength="7" maxlength="15" size="15" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" disabled>
</div>
<div class="field">
<div class="label">Gateway:</div>
<input class="input" type="text" name="deviceToken" value="<?php echo $DEVICE['gateway']; ?>" minlength="7" maxlength="15" size="15" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" disabled>
</div> </div>
<?php if ($DEVICE['userIsAdmin']) { ?> <?php if ($DEVICE['userIsAdmin']) { ?>
<?php if (!in_array($SUBDEVICE['type'], ['on/off', 'door', 'water'])) { ?> <?php if (!in_array($SUBDEVICE['type'], ['on/off', 'door', 'water'])) { ?>