|
|
|
@ -25,55 +25,78 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
$NOFILL = 'readonly onfocus="this.removeAttribute(\'readonly\')" style="cursor:text" autocomplete="off"'; |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<form class="Box str mobcol" action="<?= e(url('system_set')) ?>" method="GET" id="form-1">
|
|
|
|
|
<h2 tabindex=0><?= tr('system.uart') ?></h2>
|
|
|
|
|
<form class="Box str mobcol" action="<?= e(url('system_set')) ?>" method="GET" id="form-2">
|
|
|
|
|
<h2 tabindex=0><?= tr('system.security') ?></h2>
|
|
|
|
|
|
|
|
|
|
<!-- flag to use the security cgi handler --> |
|
|
|
|
<input type="hidden" name="security" value="1"> |
|
|
|
|
|
|
|
|
|
<div class="Row explain"> |
|
|
|
|
<?= tr('system.explain_uart') ?> |
|
|
|
|
<?= tr('system.explain_security') ?> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="uart_baud"><?= tr('uart.baud') ?><span class="mq-phone"> (bps)</span></label>
|
|
|
|
|
<select name="uart_baud" id="uart_baud" class="short"> |
|
|
|
|
<?php foreach([ |
|
|
|
|
300, 600, 1200, 2400, 4800, 9600, 19200, 38400, |
|
|
|
|
57600, 74880, 115200, 230400, 460800, 921600, 1843200, 3686400, |
|
|
|
|
] as $b): |
|
|
|
|
?><option value="<?=$b?>"><?= number_format($b, 0, ',', '.') ?></option>
|
|
|
|
|
<?php endforeach; ?> |
|
|
|
|
<label for="pwlock"><?= tr("system.pwlock") ?></label>
|
|
|
|
|
<select name="pwlock" id="pwlock"> |
|
|
|
|
<option value="0"><?= tr("system.pwlock.none") ?></option>
|
|
|
|
|
<option value="1"><?= tr("system.pwlock.settings_noterm") ?></option>
|
|
|
|
|
<option value="2"><?= tr("system.pwlock.settings") ?></option>
|
|
|
|
|
<option value="3"><?= tr("system.pwlock.menus") ?></option>
|
|
|
|
|
<option value="4"><?= tr("system.pwlock.all") ?></option>
|
|
|
|
|
</select> |
|
|
|
|
<span class="mq-no-phone"> bps</span> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="uart_parity"><?= tr('uart.parity') ?></label>
|
|
|
|
|
<select name="uart_parity" id="uart_parity" class="short"> |
|
|
|
|
<?php foreach([ |
|
|
|
|
2 => tr('uart.parity.none'), |
|
|
|
|
1 => tr('uart.parity.odd'), |
|
|
|
|
0 => tr('uart.parity.even'), |
|
|
|
|
] as $k => $label): |
|
|
|
|
?><option value="<?=$k?>"><?=$label?></option>
|
|
|
|
|
<?php endforeach; ?> |
|
|
|
|
</select> |
|
|
|
|
<label for="access_pw"><?= tr('system.new_access_pw') ?></label>
|
|
|
|
|
<input type="password" name="access_pw" id="access_pw" <?=$NOFILL?>>
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="uart_stopbits"><?= tr('uart.stop_bits') ?></label>
|
|
|
|
|
<select name="uart_stopbits" id="uart_stopbits" class="short"> |
|
|
|
|
<?php foreach([ |
|
|
|
|
1 => tr('uart.stop_bits.one'), |
|
|
|
|
2 => tr('uart.stop_bits.one_and_half'), |
|
|
|
|
3 => tr('uart.stop_bits.two'), |
|
|
|
|
] as $k => $label): |
|
|
|
|
?><option value="<?=$k?>"><?=$label?></option>
|
|
|
|
|
<?php endforeach; ?> |
|
|
|
|
</select> |
|
|
|
|
<label for="access_pw2"><?= tr('system.new_access_pw2') ?></label>
|
|
|
|
|
<input type="password" name="access_pw2" id="access_pw2" <?=$NOFILL?>>
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="pw"><?= tr('system.admin_pw') ?></label>
|
|
|
|
|
<input type="password" name="pw" id="pw" required> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row buttons"> |
|
|
|
|
<a class="button icn-ok" href="#" onclick="qs('#form-2').submit()"><?= tr('apply') ?></a>
|
|
|
|
|
</div> |
|
|
|
|
</form> |
|
|
|
|
|
|
|
|
|
<form class="Box str mobcol" action="<?= e(url('system_set')) ?>" method="GET" id="form-3">
|
|
|
|
|
<h2 tabindex=0><?= tr('system.change_adminpw') ?></h2>
|
|
|
|
|
|
|
|
|
|
<!-- flag to use the security cgi handler --> |
|
|
|
|
<input type="hidden" name="security" value="1"> |
|
|
|
|
|
|
|
|
|
<div class="Row explain"> |
|
|
|
|
<?= tr('system.explain_adminpw') ?> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="admin_pw"><?= tr('system.new_admin_pw') ?></label>
|
|
|
|
|
<input type="password" name="admin_pw" id="admin_pw"> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="admin_pw2"><?= tr('system.new_admin_pw2') ?></label>
|
|
|
|
|
<input type="password" name="admin_pw2" id="admin_pw2"> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row"> |
|
|
|
|
<label for="pw"><?= tr('system.old_admin_pw') ?></label>
|
|
|
|
|
<input type="password" name="pw" id="pw" required> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="Row buttons"> |
|
|
|
|
<a class="button icn-ok" href="#" onclick="qs('#form-1').submit()"><?= tr('apply') ?></a>
|
|
|
|
|
<a class="button icn-ok" href="#" onclick="qs('#form-3').submit()"><?= tr('apply') ?></a>
|
|
|
|
|
</div> |
|
|
|
|
</form> |
|
|
|
|
|
|
|
|
@ -84,7 +107,5 @@ |
|
|
|
|
location.href = <?=json_encode(url('write_defaults')) ?> + '?pw=' + pw;
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$('#uart_baud').val(%uart_baud%); |
|
|
|
|
$('#uart_parity').val(%uart_parity%); |
|
|
|
|
$('#uart_stopbits').val(%uart_stopbits%); |
|
|
|
|
$('#pwlock').val(%pwlock%); |
|
|
|
|
</script> |
|
|
|
|