Removed required

This commit is contained in:
CommanderRedYT
2021-11-24 16:51:38 +01:00
parent 6ffa4580d8
commit c32007bc3b
3 changed files with 4 additions and 4 deletions

View File

@ -185,7 +185,7 @@ esp_err_t webserver_ota_handler(httpd_req_t *req)
body += "Trigger Update"; body += "Trigger Update";
} }
body += fmt::format("<input type=\"text\" name=\"url\" value=\"{}\" required />", esphttpdutils::htmlentities(stringSettings.otaUrl)); body += fmt::format("<input type=\"text\" name=\"url\" value=\"{}\" />", esphttpdutils::htmlentities(stringSettings.otaUrl));
{ {
HtmlTag buttonTag{"button", "type=\"submit\"", body}; HtmlTag buttonTag{"button", "type=\"submit\"", body};

View File

@ -42,7 +42,7 @@ typename std::enable_if<
, bool>::type , bool>::type
showInputForSetting(std::string_view key, T value, std::string &body) showInputForSetting(std::string_view key, T value, std::string &body)
{ {
body += fmt::format("<input type=\"number\" name=\"{}\" value=\"{}\" min=\"{}\" max=\"{}\" step=\"1\" required />", body += fmt::format("<input type=\"number\" name=\"{}\" value=\"{}\" min=\"{}\" max=\"{}\" step=\"1\" />",
esphttpdutils::htmlentities(key), esphttpdutils::htmlentities(key),
value, value,
std::numeric_limits<T>::min(), std::numeric_limits<T>::min(),
@ -56,7 +56,7 @@ typename std::enable_if<
, bool>::type , bool>::type
showInputForSetting(std::string_view key, T value, std::string &body) showInputForSetting(std::string_view key, T value, std::string &body)
{ {
body += fmt::format("<input type=\"text\" name=\"{}\" value=\"{}{}{}{}\" pattern=\"[0-9]{{4}}\" required />", body += fmt::format("<input type=\"text\" name=\"{}\" value=\"{}{}{}{}\" pattern=\"[0-9]{{4}}\" />",
esphttpdutils::htmlentities(key), esphttpdutils::htmlentities(key),
value[0], value[0],
value[1], value[1],

View File

@ -81,7 +81,7 @@ esp_err_t webserver_stringSettings_handler(httpd_req_t *req)
{ {
HtmlTag divTag{"div", "class=\"form-table-cell\"", body}; HtmlTag divTag{"div", "class=\"form-table-cell\"", body};
body += fmt::format("<input type=\"text\" name=\"{}\" value=\"{}\" required />", body += fmt::format("<input type=\"text\" name=\"{}\" value=\"{}\" />",
esphttpdutils::htmlentities(key), esphttpdutils::htmlentities(key),
esphttpdutils::htmlentities(value)); esphttpdutils::htmlentities(value));
} }