summaryrefslogtreecommitdiff
path: root/modules/pref-filters.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-08-06 09:08:26 +0100
committerAndrew Dolgov <[email protected]>2008-08-06 09:08:26 +0100
commita44db887de77a0d2284a375c8af6d765f8fc4eb9 (patch)
treec7409bfa49b37a8a48eb0b1b2e38820f879dd2f7 /modules/pref-filters.php
parentecace165c18da3e55c7bba759f5bc89503b7da86 (diff)
filter edit dialog: add remove button
Diffstat (limited to 'modules/pref-filters.php')
-rw-r--r--modules/pref-filters.php76
1 files changed, 8 insertions, 68 deletions
diff --git a/modules/pref-filters.php b/modules/pref-filters.php
index 927cddcd7..3946be5f3 100644
--- a/modules/pref-filters.php
+++ b/modules/pref-filters.php
@@ -38,74 +38,6 @@
$filter_types[$line["id"]] = __($line["description"]);
}
-/* print "<table width='100%'>";
-
- print "<tr><td>".__('Match:')."</td>
- <td><input onkeypress=\"return filterCR(event, filterEditSave)\"
- onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
- onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
- name=\"reg_exp\" class=\"iedit\" value=\"$reg_exp\">";
-
- print "</td></tr><tr><td>".__('On field:')."</td><td>";
-
- print_select_hash("filter_type", $filter_type, $filter_types, "class=\"_iedit\"");
-
- print "</td></tr>";
- print "<tr><td>".__('Feed:')."</td><td colspan='2'>";
-
- print_feed_select($link, "feed_id", $feed_id);
-
- print "</td></tr>";
-
- print "<tr><td>".__('Action:')."</td>";
-
- print "<td colspan='2'><select name=\"action_id\"
- onchange=\"filterDlgCheckAction(this)\">";
-
- $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
- ORDER BY name");
-
- while ($line = db_fetch_assoc($result)) {
- $is_sel = ($line["id"] == $action_id) ? "selected" : "";
- printf("<option value='%d' $is_sel>%s</option>", $line["id"], __($line["description"]));
- }
-
- print "</select>";
-
- print "</td></tr>";
-
- print "<tr><td>".__('Params:')."</td>";
-
- $param_disabled = ($action_id == 4 || $action_id == 6) ? "" : "disabled";
-
- print "<td><input $param_disabled class='iedit'
- name=\"action_param\" value=\"$action_param\"></td></tr>";
-
- if ($enabled) {
- $checked = "checked";
- } else {
- $checked = "";
- }
-
- print "<tr><td valign='top'>Options:</td><td>
- <input type=\"checkbox\" name=\"enabled\" id=\"enabled\" $checked>
- <label for=\"enabled\">".__('Enabled')."</label><br/>";
-
- if ($inverse) {
- $checked = "checked";
- } else {
- $checked = "";
- }
-
- print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\" $checked>
- <label for=\"inverse\">".__('Inverse match')."</label>";
-
- print "</td></tr></table>";
-
- print "</form>";
-
- print "<hr>"; */
-
print "<div class=\"dlgSec\">".__("Match")."</div>";
print "<div class=\"dlgSecCont\">";
@@ -188,6 +120,14 @@
type=\"submit\" onclick=\"return filterEditCancel()\"
value=\"".__('Cancel')."\">";
+ $reg_exp = htmlspecialchars($reg_exp); // second escaping seems to be needed for javascript
+
+ print "<div style=\"float : left\">";
+ print "<input type=\"submit\"
+ class=\"button\" onclick='return removeFilter($filter_id, \"$reg_exp\")'
+ value=\"".__('Remove')."\"> ";
+ print "</div>";
+
print "</div>";
return;