Supports the enable attribute for all AutoConnectElements

pull/69/head^2
Hieromon Ikasamo 6 years ago
parent 5dab5f65de
commit 27c4a0a1be
  1. 1
      README.md
  2. 4
      src/AutoConnectElementBasisImpl.h

@ -103,6 +103,7 @@ Full documentation is available on https://Hieromon.github.io/AutoConnect, some
- Supports **AutoConnectElement::as<T\>** function to easily coding for conversion from an AutoConnectElement to an actual type. - Supports **AutoConnectElement::as<T\>** function to easily coding for conversion from an AutoConnectElement to an actual type.
- Supports new element type **AutoConnectFile** and built-in file uploader. - Supports new element type **AutoConnectFile** and built-in file uploader.
- Supports a **format attribute** with the AutoConnectText element. - Supports a **format attribute** with the AutoConnectText element.
- Supports a **AutoConnectSelect::selected** attribute.
- Fixed blank page responds with Configure new. - Fixed blank page responds with Configure new.
- Changed menu labels placement in source files structure. - Changed menu labels placement in source files structure.

@ -181,6 +181,7 @@ 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 (enable) {
if (label.length()) { if (label.length()) {
html = label; html = label;
if (order == AC_Vertical) if (order == AC_Vertical)
@ -197,6 +198,7 @@ const String AutoConnectRadioBasis::toHTML(void) const {
if (order == AC_Vertical) if (order == AC_Vertical)
html += String(F("<br>")); html += String(F("<br>"));
} }
}
return html; return html;
} }
@ -245,6 +247,7 @@ 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 (enable) {
if (label.length()) if (label.length())
html = String(F("<label for=\"")) + name + String("\">") + label + String(F("</label>")); html = String(F("<label for=\"")) + name + String("\">") + label + String(F("</label>"));
html += String(F("<select name=\"")) + name + String(F("\" id=\"")) + name + String("\">"); html += String(F("<select name=\"")) + name + String(F("\" id=\"")) + name + String("\">");
@ -256,6 +259,7 @@ const String AutoConnectSelectBasis::toHTML(void) const {
html += ">" + option + String(F("</option>")); html += ">" + option + String(F("</option>"));
} }
html += String(F("</select>")); html += String(F("</select>"));
}
return html; return html;
} }

Loading…
Cancel
Save