Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit f21548f

Browse files
committed
Added confirmation to static config button
1 parent b66cde6 commit f21548f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

WrapperWebconfig.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,21 @@ String WrapperWebconfig::htmlTemplate(String title, String content) {
152152

153153
html += "<title>" + title + "</title>";
154154

155-
//html += "<script src=\"https://code.jquery.com/jquery-2.2.1.min.js\" integrity=\"sha256-gvQgAFzTH6trSrAWoH1iPo9Xc96QxSZ3feW6kem+O00=\" crossorigin=\"anonymous\"></script>";
156-
//html += "<script src=\"https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css\"></script>"
155+
html += "<script src=\"https://code.jquery.com/jquery-2.2.1.min.js\" integrity=\"sha256-gvQgAFzTH6trSrAWoH1iPo9Xc96QxSZ3feW6kem+O00=\" crossorigin=\"anonymous\"></script>";
156+
//html += "<script src=\"https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css\"></script>";
157157

158158
html += "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css\" integrity=\"sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7\" crossorigin=\"anonymous\">";
159159
html += "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css\" integrity=\"sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r\" crossorigin=\"anonymous\">";
160160
html += "<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js\" integrity=\"sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS\" crossorigin=\"anonymous\"></script>";
161+
162+
html += "<script>";
163+
html += "$(document).ready(function() {";
164+
html += " $(\"#loadStatic\").click(function(event) {";
165+
html += " if( !confirm('Are you sure you want to overwrite your settings with those from the ConfigStatic.h?') ) ";
166+
html += " event.preventDefault();";
167+
html += " });";
168+
html += "});";
169+
html += "</script>";
161170

162171
html += "</head>";
163172

0 commit comments

Comments
 (0)