diff --git a/src/custom/custom.cxx b/src/custom/custom.cxx index 530ca20..385f9e3 100644 --- a/src/custom/custom.cxx +++ b/src/custom/custom.cxx @@ -153,6 +153,17 @@ struct NAME_VALUE { NAME_VALUE(int ID, string S1, string S2) {id = ID; name = S1; value = S2;} }; +// customform fields + +string custombuffer; +string def_custom_filename = ""; +string base_custom_filename = ""; +string def_custom_TemplateName = ""; + +string custom_title = ":TITLE:"; +string custom_msg = ":mg:"; +string custom_field; + std::vector name_values; string html_form; @@ -426,6 +437,7 @@ static char buff[5000]; } memset(buff, 0, sizeof(buff)); mg_get_var(conn, field.c_str(), buff, sizeof(buff)); + switch (name_values[n].id) { case T_RADIO : p = name_values[n].name.find("."); @@ -577,7 +589,6 @@ void custom_editor(struct mg_connection *conn) { string html_edit = html_form; size_t p = html_edit.find("
"); - if (p == string::npos) return; html_edit.replace(p, 6, action_str); @@ -651,20 +662,30 @@ void custom_viewer(struct mg_connection *conn) pstart = html_view.find("