#pragma once

char filter_HTML_String[] = 
"<label for=\"channel\">Channel:</label>\n"
"\n"
"<select name=\"channel\" id=\"channel\" form=\"form_id\"></select>\n"
"\n"
"<form action=\"/filter/submit\" id=\"form_id\">\n"
"    <label for=\"Order\">Order:</label>\n"
"    <input type=\"number\" id=\"order\" name=\"order\"><br>\n"
"    <label for=\"Frequency\">Frequency:</label>\n"
"    <input type=\"number\" id=\"frequency\" name=\"frequency\"><br>\n"
"    <label for=\"hpf\">Low Pass Filter:</label>\n"
"    <input type=\"radio\" id=\"lpf\" name=\"filter\" value=\"0\"><br>\n"
"    <label for=\"lpf\">High Pass Filter:</label>\n"
"    <input type=\"radio\" id=\"hpf\" name=\"filter\" value=\"1\"><br>\n"
"    <input type=\"submit\" value=\"Save\">\n"
"  </form>\n"
"\n"
"  <script>\n"
"\n"
"const select = document.getElementById(\'channel\');\n"
"    window.onload = function()\n"
"    {\n"
"        \n"
"        for(var i = 1; i < 3; i++)\n"
"        {\n"
"            var element = document.createElement(\'option\');\n"
"            element.value = i;\n"
"            element.innerHTML = i;\n"
"            select.appendChild(element);\n"
"        }\n"
"    }\n"
"\n"
"    select.onchange = async function()\n"
"    {\n"
"        const response = await fetch(\'/filter/channel\'+select.value);\n"
"        var result = await response.json();\n"
"        //get the current filter for that channel\n"
"        document.getElementById(\'order\').value = result[\"order\"];\n"
"        document.getElementById(\'frequency\').value = result[\"frequency\"];\n"
"        if(result[\"filtertype\"] === \"1\")\n"
"        document.getElementById(\'hpf\').checked = true;\n"
"    else\n"
"    document.getElementById(\'lpf\').checked = true;\n"
"    }\n"
"\n"
"    \n"
"  </script>\n"
;