mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
add js to firmwaree upload
hide upload until selected, update return msg box
This commit is contained in:
@@ -303,7 +303,11 @@ button.D{
|
||||
<p/>More information about WiFiManager at <a href='https://github.com/tzapu/WiFiManager'>https://github.com/tzapu/WiFiManager</a>
|
||||
<!-- /HTTP_HELP -->
|
||||
<!-- FORM_UPLOAD -->
|
||||
<Br/><br/>Form UPLOAD<br/><form method='POST' action='u' enctype='multipart/form-data'><input type='file' name='update' accept='.bin,application/octet-stream'><button type='submit' value='Submit'>Submit</button></form>
|
||||
<Br/><br/>Form UPLOAD<br/>
|
||||
<form method='POST' action='u' enctype='multipart/form-data'>
|
||||
<input type='file' name='update' accept='.bin,application/octet-stream' onchange="(function(el){document.getElementById('uploadbin').style.display = el.value=='' ? 'none' : 'initial';})(this)">
|
||||
<button id='uploadbin' class="h">Submit</button>
|
||||
</form>
|
||||
<!-- /FORM_UPLOAD -->
|
||||
|
||||
<!-- HTTP_END -->
|
||||
|
||||
+3
-3
@@ -116,9 +116,9 @@ const char HTTP_HELP[] PROGMEM =
|
||||
"</table>"
|
||||
"<p/>More information about WiFiManager at <a href='https://github.com/tzapu/WiFiManager'>https://github.com/tzapu/WiFiManager</a>.";
|
||||
|
||||
const char HTTP_UPDATE[] PROGMEM = "<form method='POST' action='u' enctype='multipart/form-data'><input type='file' name='update' accept='.bin,application/octet-stream'><input type='submit' value='Update'></form>";
|
||||
const char HTTP_UPDATE_FAIL[] PROGMEM = "Update Failed!";
|
||||
const char HTTP_UPDATE_OK[] PROGMEM = "Update OK! Rebooting now...";
|
||||
const char HTTP_UPDATE[] PROGMEM = "Upload New Firmware<br/><form method='POST' action='u' enctype='multipart/form-data' onchange=\"(function(el){document.getElementById('uploadbin').style.display = el.value=='' ? 'none' : 'initial';})(this)\"><input type='file' name='update' accept='.bin,application/octet-stream'><button id='uploadbin' type='submit' class='h D'>Update</button></form>";
|
||||
const char HTTP_UPDATE_FAIL[] PROGMEM = "<div class='msg D'><strong>Update Failed!</strong><Br/>Reboot device and try again</div>";
|
||||
const char HTTP_UPDATE_OK[] PROGMEM = "<div class='msg P'><strong>Update OK!</strong> Device Rebooting now...</div>";
|
||||
|
||||
#ifdef JSTEST
|
||||
const char HTTP_JS[] PROGMEM =
|
||||
|
||||
Reference in New Issue
Block a user