diff --git a/src/html_table.cpp b/src/html_table.cpp index ce40057..7126249 100644 --- a/src/html_table.cpp +++ b/src/html_table.cpp @@ -71,16 +71,16 @@ void writeTableInto(String* out_str, const VariableGroup& vars, const char* titl } void writeFormRowInto(String* out_str, const VariableBase& var) { - *out_str += ""; + *out_str += "

"; *out_str += var.human_str(); if (var.units() && var.units()[0]) { *out_str += " ("; escape(out_str, var.units()); *out_str += ")"; } - *out_str += ""; + *out_str += "
"; *out_str += var.formEntry(); - *out_str += "\n"; + *out_str += "

"; } void writeFormRowsInto(String* out_str, const VariableGroup& vars) { @@ -92,24 +92,12 @@ void writeFormRowsInto(String* out_str, const VariableGroup& vars) { } void writeFormTableInto(String* out_str, const VariableGroup& vars, const char* title, const char* css_class) { - *out_str += "\n" - "\n" - "\n" - "\n"; + *out_str += "  "; writeFormRowsInto(out_str, vars); - *out_str += - "\n"; - *out_str += " \n"; - *out_str += - "\n" - "
"; + *out_str += "
\n
\n  "; escape(out_str, title ? title : vars.name()); - *out_str += - "
\n"; + *out_str += "


\n"; + *out_str += "\n"; } } // namespace og3::html diff --git a/src/variable.cpp b/src/variable.cpp index db7c3a9..525149a 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -181,7 +181,7 @@ BinarySensorVariable& BinarySensorVariable::operator=(bool value) { String BoolVariable::formEntry() const { auto radio = [this](const String& val, bool checked) -> String { String id_val; - html::escape(&id_val, string().c_str()); + html::escape(&id_val, name()); id_val += "_" + val; return ""; diff --git a/src/web.cpp b/src/web.cpp index b54cd57..ce0d7d3 100644 --- a/src/web.cpp +++ b/src/web.cpp @@ -72,6 +72,7 @@ const char html_page_template[] PROGMEM = R"====(

%FOOTER%
+ )====";