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;
30 <img src="static/webcit_icons/essen/32x32/config.png">
31 <h1><?_("View/edit server-side mail filters")></h1>
34 <div id="content" class="service">
36 <table class="sieve_background">
38 <form id="sieveform" method="post" action="save_sieve">
39 <input type="hidden" name="nonce" value="<?NONCE>">
41 <?--("The no filtering div")>
42 <?_("When new mail arrives: ")>
43 <select name="bigaction" size=1 onChange="ToggleSievePanels();">
44 <option <?%("COND:BSTR", 1, "__SIEVE:RULESSCRIPT", 1, "", "selected")> value="0"><?_("Leave it in my inbox without filtering")></option>
45 <option <?%("COND:BSTR", 1, "__SIEVE:RULESSCRIPT", 1, "selected", "")> value="1"><?_("Filter it according to rules selected below")></option>
46 <option <?%("COND:BSTR", 1, "__SIEVE:EXTERNAL_SCRIPT", 1, "selected", "")> value="2"><?_("Filter it through a manually edited script (advanced users only)")></option>
49 <div id="sievediv0" style="display:none">
50 <div align="center"><br><br>
51 <?_("Your incoming mail will not be filtered through any scripts.")>
54 <?--("The webcit managed scripts div")>
56 <div id="sievediv1" style="display:none">
60 <?--("The I am smart and can write my own Sieve scripts div ")>
62 <div id="sievediv2" style="display:none">
64 <?!("COND:BSTR", 1, "__SIEVE:RULESSCRIPT", 1)>
65 <?_("The currently active script is: ")>
66 <select name="active_script" size=1 onChange="ToggleScriptPanels();">
67 <?ITERATE("SIEVE:SCRIPTS", ="sieve_list_select_one")>
71 <a href="display_add_remove_scripts"><?_("Add or delete scripts")></a>
73 <?ITERATE("SIEVE:SCRIPTS", ="sieve_display_one_script")>
77 <script type="text/javascript">ToggleScriptPanels();</script>
79 <?--("The rest of this is common for all panels... ")>
81 <div align="center"><br>
82 <input type="submit" name="save_button" value='<?_("Save changes")>'>
84 <input type="submit" name="cancel_button" value='<?_("Cancel")>'>
89 <script type="text/javascript">ToggleSievePanels();</script>
90 </div> <!-- end of 'content' div -->