fix address form and calibration form
This commit is contained in:
@@ -68,6 +68,26 @@ of the license in the project repository or at <https://www.gnu.org/licenses/agp
|
|||||||
</article>
|
</article>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
<dialog id="dialog_change_calibration">
|
||||||
|
<article>
|
||||||
|
<h2>Change calibration</h2>
|
||||||
|
<section>
|
||||||
|
<form id="form_change_calibration">
|
||||||
|
<label>
|
||||||
|
New calibration data (default 1400):
|
||||||
|
<input id="form_change_calibration_data" name="calibration" type="number"
|
||||||
|
placeholder="Calibration Value" value="1400" />
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
<footer>
|
||||||
|
<button class="secondary btn_cancel">
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button class="btn_confirm">Confirm</button>
|
||||||
|
</footer>
|
||||||
|
</article>
|
||||||
|
</dialog>
|
||||||
|
|
||||||
<main class="container">
|
<main class="container">
|
||||||
<div id="message_container" style="width: 100%;" class="notification-container">
|
<div id="message_container" style="width: 100%;" class="notification-container">
|
||||||
<template id="notification">
|
<template id="notification">
|
||||||
|
|||||||
@@ -280,10 +280,11 @@ function display_dialog_change_address() {
|
|||||||
const dialog = document.getElementById("change_address");
|
const dialog = document.getElementById("change_address");
|
||||||
dialog.showModal();
|
dialog.showModal();
|
||||||
const dialog_el = dialog.querySelector("article").querySelector("section").querySelector("footer");
|
const dialog_el = dialog.querySelector("article").querySelector("section").querySelector("footer");
|
||||||
const addr_old = Number(dialog.querySelector("#form_change_address_old").value);
|
|
||||||
const addr_new = Number(dialog.querySelector("#form_change_address_new").value);
|
|
||||||
|
|
||||||
dialog_el.querySelector(".btn_confirm").onclick = function () {
|
dialog_el.querySelector(".btn_confirm").onclick = function () {
|
||||||
|
const addr_old = Number(dialog.querySelector("#form_change_address_old").value);
|
||||||
|
const addr_new = Number(dialog.querySelector("#form_change_address_new").value);
|
||||||
const msg = {
|
const msg = {
|
||||||
"command": "dr_setaddress",
|
"command": "dr_setaddress",
|
||||||
"address": addr_old,
|
"address": addr_old,
|
||||||
|
|||||||
Reference in New Issue
Block a user