1 <?=("head")><?=("important_msg")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
3 <?--("iterate over an empty template, so we have the states already loaded for below")><?ITERATE("SIEVE:SCRIPTS", ="sieve_empty")>
4 <script type="text/javascript">
6 var previously_active_script;
8 function ToggleSievePanels() {
9 d = ($('sieveform').bigaction.options[$('sieveform').bigaction.selectedIndex].value);
12 $('sievediv' + i).style.display = 'block';
15 $('sievediv' + i).style.display = 'none';
20 function ToggleScriptPanels() {
21 d = ($('sieveform').active_script.options[$('sieveform').active_script.selectedIndex].value);
22 if ($('script_' + previously_active_script)) {
23 $('script_' + previously_active_script).style.display = 'none';
25 $('script_' + d).style.display = 'block';
26 previously_active_script = d;
29 <?ITERATE("SIEVE:RULE:EMPTY", ="sieve_display_one")>
33 <img src="static/webcit_icons/essen/32x32/config.png">
34 <h1><?_("View/edit server-side mail filters")></h1>
37 <div id="content" class="service">
39 <table class="sieve_background">
41 <form id="sieveform" method="post" action="save_sieve">
42 <input type="hidden" name="nonce" value="<?NONCE>">
44 <?--("The no filtering div")>
45 <?_("When new mail arrives: ")>
46 <select name="bigaction" size=1 onChange="ToggleSievePanels();">
47 <option <?%("COND:BSTR", 1, "__SIEVE:RULESSCRIPT", 1, "", "selected")> value="0"><?_("Leave it in my inbox without filtering")></option>
48 <option <?%("COND:BSTR", 1, "__SIEVE:RULESSCRIPT", 1, "selected", "")> value="1"><?_("Filter it according to rules selected below")></option>
49 <option <?%("COND:BSTR", 1, "__SIEVE:EXTERNAL_SCRIPT", 1, "selected", "")> value="2"><?_("Filter it through a manually edited script (advanced users only)")></option>
52 <div id="sievediv0" style="display:none">
53 <div align="center"><br><br>
54 <?_("Your incoming mail will not be filtered through any scripts.")>
57 <?--("The webcit managed scripts div")>
59 <div id="sievediv1" style="display:none">
63 <?--("The I am smart and can write my own Sieve scripts div ")>
65 <div id="sievediv2" style="display:none">
67 <?!("COND:BSTR", 1, "__SIEVE:RULESSCRIPT", 1)>
68 <?_("The currently active script is: ")>
69 <select name="active_script" size=1 onChange="ToggleScriptPanels();">
70 <?ITERATE("SIEVE:SCRIPTS", ="sieve_list_select_one")>
74 <a href="display_add_remove_scripts"><?_("Add or delete scripts")></a>
76 <?ITERATE("SIEVE:RULES", ="sieve_display_one_script")>
80 <script type="text/javascript">ToggleScriptPanels();</script>
82 <?--("The rest of this is common for all panels... ")>
84 <div align="center"><br>
85 <input type="submit" name="save_button" value='<?_("Save changes")>'>
87 <input type="submit" name="cancel_button" value='<?_("Cancel")>'>
92 <script type="text/javascript">ToggleSievePanels();</script>
93 </div> <!-- end of 'content' div -->