Commit | Line | Data |
---|---|---|
b19786ca PH |
1 | <br /> |
2 | <div class="rubrique"><?php i18n('filter_title'); ?></div> | |
3 | <?php | |
4 | i18n('filter_help'); | |
5 | ?> | |
6 | <table width="95%" cellspacing="0" cellpadding="2" align="center"> | |
7 | <tr><td width="25%" valign="top"> | |
8 | <form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post" id="order" name="order" onsubmit="return false;"> | |
9 | <table class="bicol" width="100%" cellpadding="1" cellspacing="1"> | |
10 | <tr><th><?php i18n('filter_list_title');?></th></tr> | |
11 | <tr><td> | |
12 | <?php | |
13 | foreach($filter->rules as $id=>$rule) | |
14 | if($id) | |
15 | echo "<input type=\"hidden\" id=\"order$id\" name=\"order[$id]\" value=\"{$rule->rank}\" />\n"; | |
16 | ||
17 | $presel = (isset($_POST['rule']['id']) ? $_POST['rule']['id'] | |
18 | : (isset($_POST['order']['select']) ? $_POST['order']['select'] : 0)); | |
19 | ||
20 | echo "<select size=\"16\" style=\"width:100%;\" id=\"orderSelect\" name=\"order[select]\" onchange=\"createRuleForm()\">\n"; | |
21 | echo "<option value=\"0\" ".($presel ? "" : " selected=\"selected\"").">"; | |
22 | i18n('new_rule'); | |
23 | echo "</option>\n"; | |
24 | ||
25 | foreach($filter->rules as $id=>$rule) | |
26 | if($id) | |
27 | echo "<option value=\"$id\"" | |
28 | .($presel==$id ? " selected=\"selected\"":"") | |
29 | .">{$rule->name}</option>\n"; | |
30 | ?> | |
31 | </select> | |
32 | </td></tr><tr><td> | |
33 | <input type="submit" value="<?php i18n('up');?>" name="order[up]" onclick="order_up();" /> | |
34 | <input type="submit" value="<?php i18n('dn');?>" name="order[dn]" onclick="order_dn();" /><br /> | |
35 | <input type="submit" value="<?php i18n('del');?>" name="order[delete]" onclick="order_submit(this)" /> | |
36 | <input type="submit" value="<?php i18n('submit');?>" name="order[submit]" onclick="order_submit(this)" /> | |
37 | <input type="hidden" value="" name="order[action]" /> | |
38 | </td></tr> | |
39 | </table> | |
40 | </form> | |
41 | </td> | |
42 | <td valign="top"> | |
43 | <form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post" id="rule" name="rule" onsubmit="return false;"> | |
44 | <table width="100%" class="bicol" cellspacing="1" cellpadding="1"> | |
45 | <tr><th><?php i18n('rule_name'); ?> | |
46 | </th></tr><tr><td> | |
47 | <input type="text" value="" id="ruleName" name="rule[name]" style="width: 100%;" | |
48 | onfocus="text_onfocus(this,'<?php i18n('new_rule');?>')" | |
49 | onblur="text_onblur(this,'<?php i18n('new_rule');?>')" /> | |
50 | </td></tr> | |
51 | <tr class="impair"><th><?php i18n('filter_rule_conf');?> | |
52 | </th></tr><tr class="impair"><td> | |
53 | <input type="radio" value="1" id="ruleAll1" name="rule[all]" /><?php i18n('all_matches');?> | |
54 | <input type="radio" value="0" id="ruleAll0" name="rule[all]" /><?php i18n('one_match');?> | |
55 | <br /> | |
56 | <input type="checkbox" checked="checked" id="ruleBlock" name="rule[block]" /> | |
57 | <?php i18n('blocking_rule');?> | |
58 | </td></tr><tr class="impair"><th><?php i18n('filter_matches_list');?> | |
59 | </th></tr><tr class="impair"><td id="matchesRow"> | |
60 | </td></tr><tr class="impair"><th><?php i18n('filter_actions_list');?> | |
61 | </th></tr><tr class="impair"><td id="actionsRow"> | |
62 | </td></tr><tr class="impair"><td> | |
63 | <input type="hidden" value="0" id="ruleId" name="rule[id]" /> | |
64 | <input type="submit" value="<?php i18n('new_match');?>" name="rule[new_match]" onclick="newMatch() "/> | |
65 | <input type="submit" value="<?php i18n('new_action');?>" name="rule[new_action]" onclick="newAction()" /> | |
66 | <input type="submit" value="<?php i18n('submit');?>" name="rule[submit]" onclick="this.form.submit()" /> | |
67 | </td></tr> | |
68 | </table> | |
69 | </form> | |
70 | </td> | |
71 | </tr> | |
72 | </table> | |
73 | ||
74 | <script type="text/javascript"> | |
75 | createRuleForm(); | |
76 | </script> |