summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-17 19:34:54 +0300
committerAndrew Dolgov <[email protected]>2021-02-17 19:34:54 +0300
commitb16abc157ee584f4be80a537ee24ec9e5ff25496 (patch)
treeb09e841d5cc1be8b066ac831588d01792ea1ad01 /classes/feeds.php
parent92cb91e2e22282e3ad9da2f5312d7815720af6b6 (diff)
* App: rename hidden to hidden_tag
* search: use client dialog * add some form field helpers
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php46
1 files changed, 6 insertions, 40 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 68edfbf89..30478ae39 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -588,46 +588,12 @@ class Feeds extends Handler_Protected {
}
function search() {
- $this->params = explode(":", $_REQUEST["param"], 2);
-
- $active_feed_id = sprintf("%d", $this->params[0]);
- $is_cat = $this->params[1] != "false";
-
- print "<form onsubmit='return false'>";
-
- print "<section>";
-
- print "<fieldset>";
- print "<input dojoType='dijit.form.ValidationTextBox' id='search_query'
- style='font-size : 16px; width : 540px;'
- placeHolder=\"".T_sprintf("Search %s...", $this->_get_title($active_feed_id, $is_cat))."\"
- name='query' type='search' value=''>";
- print "</fieldset>";
-
- if (DB_TYPE == "pgsql") {
- print "<fieldset>";
- print "<label class='inline'>" . __("Language:") . "</label>";
- print \Controls\select_tag("search_language", get_pref('DEFAULT_SEARCH_LANGUAGE'), Pref_Feeds::get_ts_languages(),
- ["title" => __('Used for word stemming')], "search_language");
- print "</fieldset>";
- }
-
- print "</section>";
-
- print "<footer>";
-
- if (count(PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SEARCH)) == 0) {
- print "<button dojoType='dijit.form.Button' style='float : left' class='alt-info' onclick='window.open(\"https://tt-rss.org/wiki/SearchSyntax\")'>
- <i class='material-icons'>help</i> ".__("Search syntax")."</button>";
- }
-
- print "<button dojoType='dijit.form.Button' class='alt-primary'
- type='submit' onclick='App.dialogOf(this).execute()'>".__('Search')."</button>
- <button dojoType='dijit.form.Button' onclick='App.dialogOf(this).hide()'>".__('Cancel')."</button>";
-
- print "</footer>";
-
- print "</form>";
+ print json_encode([
+ "show_language" => DB_TYPE == "pgsql",
+ "show_syntax_help" => count(PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SEARCH)) == 0,
+ "all_languages" => Pref_Feeds::get_ts_languages(),
+ "default_language" => get_pref('DEFAULT_SEARCH_LANGUAGE')
+ ]);
}
function updatedebugger() {