From 75c2061fea4413e95d9880c68e1b8358a0379511 Mon Sep 17 00:00:00 2001 From: Christian Herzog Date: Sat, 5 Oct 2019 11:42:45 +0200 Subject: [PATCH] UI input for dhcp host name --- components/wifi-manager/code.js | 3 ++- components/wifi-manager/index.html | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 85b87291..a4f4551e 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -440,6 +440,7 @@ function performConnect(conntype){ stopRefreshAPInterval(); var pwd; + var dhcp-name $("#dhcp-name").val();; if (conntype == 'manual') { //Grab the manual SSID and PWD selectedSSID=$('#manual_ssid').val(); @@ -463,7 +464,7 @@ function performConnect(conntype){ dataType: 'json', method: 'POST', cache: false, - headers: { 'X-Custom-ssid': selectedSSID, 'X-Custom-pwd': pwd }, + headers: { 'X-Custom-ssid': selectedSSID, 'X-Custom-pwd': pwd, 'X-Custom-host_name': dhcp-name }, data: { 'timestamp': Date.now()}, error: function (xhr, ajaxOptions, thrownError) { console.log(xhr.status); diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index b8419c86..3b90dfc2 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -69,6 +69,10 @@

Enter Details

+

DHCP host name

+
+ +

Manual Connection

@@ -82,8 +86,12 @@
-

Enter Password

+

Connect to network

+

DHCP host name

+
+ +

Password for