]> code.citadel.org Git - citadel.git/blobdiff - webcit/inetconf.c
* add new 'Context' Parameter to the template call
[citadel.git] / webcit / inetconf.c
index c61ee41665ce01f98c80e3159a90f8b4c7dc6dbd..87964d30554208acc8c65a8d22bba9ef0b8ceaa8 100644 (file)
@@ -105,7 +105,7 @@ void display_inetconf(void)
                        wprintf("</td><td valign=top>");
                }
                svput("BOXTITLE", WCS_STRING, ic_boxtitle[which]);
-               do_template("beginbox");
+               do_template("beginbox", NULL);
                wprintf("<span class=\"menudesc\">");
                escputs(ic_desc[which]);
                wprintf("</span><br />");
@@ -134,14 +134,14 @@ void display_inetconf(void)
 
                }
                wprintf("<form method=\"post\" action=\"save_inetconf\">\n");
-               wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+               wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
                wprintf("<tr><td>"
                        "<input type=\"text\" name=\"ename\" maxlength=\"64\">"
                        "<input type=\"hidden\" name=\"etype\" VALUE=\"%s\">", ic_keyword[which]);
                wprintf("</td><td align=left>"
                        "<input type=\"submit\" name=\"oper\" value=\"Add\">"
                        "</td></tr></table></form>\n");
-               do_template("endbox");
+               do_template("endbox", NULL);
                wprintf("<br />");
        }
        wprintf("</td></tr></table></div>\n");
@@ -207,3 +207,11 @@ void save_inetconf(void) {
        free(etype);
        free(newconfig);
 }
+
+void 
+InitModule_INETCONF
+(void)
+{
+       WebcitAddUrlHandler(HKEY("display_inetconf"), display_inetconf, 0);
+       WebcitAddUrlHandler(HKEY("save_inetconf"), save_inetconf, AJAX);
+}