bugfixes, layout
[old-projects.git] / philter / philter / include / form_filter.inc.php
index 49aac89..8f5bd9b 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 if(count($_POST)) {                             // a FORM has been submitted
+    if(isset($_POST['emails']))                 //      FORM emails
+        if(!$mail_pool->handle_small_form())
+            echo "<p style=\"color:red;\">".$philter->error()."</p>\n";
     if(!empty($_POST['order']['action']))       //      FORM order
         if($_POST['order']['action']=='submit') {
             foreach($filter->rules as $id=>$rule)
@@ -8,14 +11,15 @@ if(count($_POST)) {                             // a FORM has been submitted
             uasort($filter->rules, 'rule_cmp');
         } elseif($_POST['order']['action']=='delete' && !empty($_POST['order']['select'])) {
             $filter->delete_rule($_POST['order']['select']);
-            $_POST['order']['select'] = min(count($filter->rules),$_POST['order']['select']);
+            unset($_POST['order']['select']);
         }
-    if(!empty($_POST['rule']))
+    if(!empty($_POST['rule']))                  //      FORM rule
         if(!$filter->handle_form())
             echo "<p style=\"color:red;\">".$philter->error()."</p>\n";
 }
 
 require("include/js_factory.inc.php");
+
 ?>
 <div class="rubrique"><?php i18n('filter_sync'); ?></div>
 <?php i18n('filter_sync_txt') ?>
@@ -26,6 +30,12 @@ require("include/js_factory.inc.php");
 </center>
 </form>
 <br />
+<div class="rubrique"><?php i18n('pool_title'); ?></div>
+<?php
+i18n('spool_help');
+echo $mail_pool->to_small_form();
+?>
+<br />
 <div class="rubrique"><?php i18n('filter_title'); ?></div>
 <?php
 i18n('filter_help');
@@ -77,7 +87,7 @@ i18n('filter_help');
         </td></tr>
         <tr class="impair"><th><?php i18n('filter_rule_conf');?>
         </th></tr><tr class="impair"><td>
-            <input type="radio" value="1" id="ruleAll1" name="rule[all]" /><?php i18n('all_matches');?>
+            <input type="radio" value="1" id="ruleAll1" name="rule[all]" /><?php i18n('all_matches');?><br />
             <input type="radio" value="0" id="ruleAll0" name="rule[all]" /><?php i18n('one_match');?>
             <br />
             <input type="checkbox" checked="checked" id="ruleBlock" name="rule[block]" />