5 * \defgroup Sieve view/edit sieve config
6 * \ingroup WebcitDisplayItems
13 * \brief view/edit sieve config
15 void display_sieve(void)
17 output_headers(1, 1, 2, 0, 0, 0);
19 wprintf("<script type=\"text/javascript\"> \n"
20 "function ToggleSievePanels() { \n"
21 " d = ($('sieveform').bigaction.options[$('sieveform').bigaction.selectedIndex].value); \n"
22 " for (i=0; i<3; ++i) { \n"
24 " $('sievediv' + i).style.display = 'block'; \n"
27 " $('sievediv' + i).style.display = 'none'; \n"
34 wprintf("<div id=\"banner\">\n");
35 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
36 wprintf("<SPAN CLASS=\"titlebar\">");
37 wprintf(_("View/edit server-side mail filters"));
39 wprintf("</TD></TR></TABLE>\n");
40 wprintf("</div>\n<div id=\"content\">\n");
42 wprintf("<div class=\"fix_scrollbar_bug\">"
43 "<table border=0 width=100%% bgcolor=\"#FFFFFF\">"
44 "<tr><td valign=top>\n");
47 wprintf("<form id=\"sieveform\" method=\"post\" action=\"save_sieve\">\n");
49 wprintf(_("When new mail arrives: "));
50 wprintf("<select name=\"bigaction\" size=1 onChange=\"ToggleSievePanels();\">\n");
52 wprintf("<option value=\"0\">");
53 wprintf(_("Leave it in my inbox without filtering"));
54 wprintf("</option>\n");
56 wprintf("<option value=\"1\">");
57 wprintf(_("Filter it according to rules selected below"));
58 wprintf("</option>\n");
60 wprintf("<option value=\"2\">");
61 wprintf(_("Filter it through a manually edited script (advanced users only)"));
62 wprintf("</option>\n");
68 /* The "no filtering" div */
70 wprintf("<div id=\"sievediv0\" style=\"display:none\">\n");
71 wprintf("<div align=\"center\"><br /><br />");
72 wprintf(_("Your incoming mail will not be filtered through any scripts."));
73 wprintf("<br /><br /></div>\n");
76 /* The "webcit managed scripts" div */
78 wprintf("<div id=\"sievediv1\" style=\"display:none\">\n");
79 wprintf("<div align=\"center\"><br /><br />");
80 wprintf("FIXME div 1 isn't finished yet");
81 wprintf("<br /><br /></div>\n");
85 /* The "I'm smart and can write my own Sieve scripts" div */
87 wprintf("<div id=\"sievediv2\" style=\"display:none\">\n");
88 wprintf("<div align=\"center\"><br /><br />");
89 wprintf("FIXME div 2 isn't finished yet");
90 wprintf("<br /><br /></div>\n");
95 /* The rest of this is common for all panels... */
97 wprintf("<div align=\"center\"><br>");
98 wprintf("<input type=\"submit\" name=\"ok_button\" value=\"%s\">", _("Save changes"));
100 wprintf("<input type=\"submit\" name=\"cancel_button\" value=\"%s\">\n", _("Cancel"));
101 wprintf("</div></form>\n");
103 wprintf("</td></tr></table></div>\n");
105 wprintf("<script type=\"text/javascript\"> \n"
106 "ToggleSievePanels(); \n"