|
|
@ -181,21 +181,23 @@ void AutoConnectRadioBasis::empty(const size_t reserve) { |
|
|
|
const String AutoConnectRadioBasis::toHTML(void) const { |
|
|
|
const String AutoConnectRadioBasis::toHTML(void) const { |
|
|
|
String html = String(""); |
|
|
|
String html = String(""); |
|
|
|
|
|
|
|
|
|
|
|
if (label.length()) { |
|
|
|
if (enable) { |
|
|
|
html = label; |
|
|
|
if (label.length()) { |
|
|
|
if (order == AC_Vertical) |
|
|
|
html = label; |
|
|
|
html += String(F("<br>")); |
|
|
|
if (order == AC_Vertical) |
|
|
|
} |
|
|
|
html += String(F("<br>")); |
|
|
|
uint8_t n = 0; |
|
|
|
} |
|
|
|
for (const String value : _values) { |
|
|
|
uint8_t n = 0; |
|
|
|
n++; |
|
|
|
for (const String value : _values) { |
|
|
|
String id = name + "_" + String(n); |
|
|
|
n++; |
|
|
|
html += String(F("<input type=\"radio\" name=\"")) + name + String(F("\" id=\"")) + id + String(F("\" value=\"")) + value + String("\""); |
|
|
|
String id = name + "_" + String(n); |
|
|
|
if (n == checked) |
|
|
|
html += String(F("<input type=\"radio\" name=\"")) + name + String(F("\" id=\"")) + id + String(F("\" value=\"")) + value + String("\""); |
|
|
|
html += String(F(" checked")); |
|
|
|
if (n == checked) |
|
|
|
html += String(F("><label for=\"")) + id + String("\">") + value + String(F("</label>")); |
|
|
|
html += String(F(" checked")); |
|
|
|
if (order == AC_Vertical) |
|
|
|
html += String(F("><label for=\"")) + id + String("\">") + value + String(F("</label>")); |
|
|
|
html += String(F("<br>")); |
|
|
|
if (order == AC_Vertical) |
|
|
|
|
|
|
|
html += String(F("<br>")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return html; |
|
|
|
return html; |
|
|
|
} |
|
|
|
} |
|
|
@ -245,17 +247,19 @@ void AutoConnectSelectBasis::select(const String& value) { |
|
|
|
const String AutoConnectSelectBasis::toHTML(void) const { |
|
|
|
const String AutoConnectSelectBasis::toHTML(void) const { |
|
|
|
String html = String(""); |
|
|
|
String html = String(""); |
|
|
|
|
|
|
|
|
|
|
|
if (label.length()) |
|
|
|
if (enable) { |
|
|
|
html = String(F("<label for=\"")) + name + String("\">") + label + String(F("</label>")); |
|
|
|
if (label.length()) |
|
|
|
html += String(F("<select name=\"")) + name + String(F("\" id=\"")) + name + String("\">"); |
|
|
|
html = String(F("<label for=\"")) + name + String("\">") + label + String(F("</label>")); |
|
|
|
uint8_t n = 1; |
|
|
|
html += String(F("<select name=\"")) + name + String(F("\" id=\"")) + name + String("\">"); |
|
|
|
for (const String option : _options) { |
|
|
|
uint8_t n = 1; |
|
|
|
html += String(F("<option value=\"")) + option + "\""; |
|
|
|
for (const String option : _options) { |
|
|
|
if (n++ == selected) |
|
|
|
html += String(F("<option value=\"")) + option + "\""; |
|
|
|
html += String(F(" selected")); |
|
|
|
if (n++ == selected) |
|
|
|
html += ">" + option + String(F("</option>")); |
|
|
|
html += String(F(" selected")); |
|
|
|
|
|
|
|
html += ">" + option + String(F("</option>")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
html += String(F("</select>")); |
|
|
|
} |
|
|
|
} |
|
|
|
html += String(F("</select>")); |
|
|
|
|
|
|
|
return html; |
|
|
|
return html; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|