summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-10 14:36:21 +0300
committerAndrew Dolgov <[email protected]>2017-02-10 14:36:21 +0300
commit328118d12ef6ba98650da8e1a1a505e080a58adf (patch)
tree2468577340c29b3b452ed67168641e5d3d730129 /classes
parent8cf37284e757cd4b36beb69fe3180dabea3e648b (diff)
use print_hidden() for hidden dojo form fields
Diffstat (limited to 'classes')
-rw-r--r--classes/article.php6
-rwxr-xr-xclasses/feeds.php8
-rwxr-xr-xclasses/pref/feeds.php16
-rwxr-xr-xclasses/pref/filters.php14
-rw-r--r--classes/pref/labels.php6
-rw-r--r--classes/pref/prefs.php32
-rw-r--r--classes/pref/users.php10
7 files changed, 46 insertions, 46 deletions
diff --git a/classes/article.php b/classes/article.php
index 46e9bb797..4126843af 100644
--- a/classes/article.php
+++ b/classes/article.php
@@ -202,9 +202,9 @@ class Article extends Handler_Protected {
$tags_str = join(", ", $tags);
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$param\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"article\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setArticleTags\">";
+ print_hidden("id", "$param");
+ print_hidden("op", "article");
+ print_hidden("method", "setArticleTags");
print "<table width='100%'><tr><td>";
diff --git a/classes/feeds.php b/classes/feeds.php
index 1375f0c37..a41109383 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -1027,8 +1027,8 @@ class Feeds extends Handler_Protected {
}
function quickAddFeed() {
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"addfeed\">";
+ print_hidden("op", "rpc");
+ print_hidden("method", "addfeed");
print "<div id='fadd_error_message' style='display : none' class='alert alert-danger'></div>";
@@ -1111,8 +1111,8 @@ class Feeds extends Handler_Protected {
$browser_search = $this->dbh->escape_string($_REQUEST["search"]);
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"updateFeedBrowser\">";
+ print_hidden("op", "rpc");
+ print_hidden("method", "updateFeedBrowser");
print "<div dojoType=\"dijit.Toolbar\">
<div style='float : right'>
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index bac859d75..8c37b430b 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -548,9 +548,9 @@ class Pref_Feeds extends Handler_Protected {
$title = htmlspecialchars($this->dbh->fetch_result($result,
0, "title"));
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$feed_id\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
+ print_hidden("id", "$feed_id");
+ print_hidden("op", "pref-feeds");
+ print_hidden("method", "editSave");
print "<div class=\"dlgSec\">".__("Feed")."</div>";
print "<div class=\"dlgSecCont\">";
@@ -816,9 +816,9 @@ class Pref_Feeds extends Handler_Protected {
print "<p>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"ids\" value=\"$feed_ids\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchEditSave\">";
+ print_hidden("ids", "$feed_ids");
+ print_hidden("op", "pref-feeds");
+ print_hidden("method", "batchEditSave");
print "<div class=\"dlgSec\">".__("Feed")."</div>";
print "<div class=\"dlgSecCont\">";
@@ -1812,8 +1812,8 @@ class Pref_Feeds extends Handler_Protected {
}
function batchSubscribe() {
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchaddfeeds\">";
+ print_hidden("op", "pref-feeds");
+ print_hidden("method", "batchaddfeeds");
print "<table width='100%'><tr><td>
".__("Add one valid RSS feed per line (no feed detection is done)")."
diff --git a/classes/pref/filters.php b/classes/pref/filters.php
index b7c286ecf..5629f530c 100755
--- a/classes/pref/filters.php
+++ b/classes/pref/filters.php
@@ -340,10 +340,10 @@ class Pref_Filters extends Handler_Protected {
print "<form id=\"filter_edit_form\" onsubmit='return false'>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$filter_id\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"csrf_token\" value=\"".$_SESSION['csrf_token']."\">";
+ print_hidden("op", "pref-filters");
+ print_hidden("id", "$filter_id");
+ print_hidden("method", "editSave");
+ print_hidden("csrf_token", $_SESSION['csrf_token']);
print "<div class=\"dlgSec\">".__("Caption")."</div>";
@@ -816,9 +816,9 @@ class Pref_Filters extends Handler_Protected {
print "<form name='filter_new_form' id='filter_new_form'>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"add\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"csrf_token\" value=\"".$_SESSION['csrf_token']."\">";
+ print_hidden("op", "pref-filters");
+ print_hidden("method", "add");
+ print_hidden("csrf_token", $_SESSION['csrf_token']);
print "<div class=\"dlgSec\">".__("Caption")."</div>";
diff --git a/classes/pref/labels.php b/classes/pref/labels.php
index 458e4f88b..b127ce95c 100644
--- a/classes/pref/labels.php
+++ b/classes/pref/labels.php
@@ -15,9 +15,9 @@ class Pref_Labels extends Handler_Protected {
$line = $this->dbh->fetch_assoc($result);
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$label_id\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-labels\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"save\">";
+ print_hidden("id", "$label_id");
+ print_hidden("op", "pref-labels");
+ print_hidden("method", "save");
print "<div class=\"dlgSec\">".__("Caption")."</div>";
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index 18ffcc720..9a7ab55a0 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -226,8 +226,8 @@ class Pref_Prefs extends Handler_Protected {
print "</table>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"changeemail\">";
+ print_hidden("op", "pref-prefs");
+ print_hidden("method", "changeemail");
print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
__("Save data")."</button>";
@@ -305,8 +305,8 @@ class Pref_Prefs extends Handler_Protected {
print "</table>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"changepassword\">";
+ print_hidden("op", "pref-prefs");
+ print_hidden("method", "changepassword");
print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
__("Change password")."</button>";
@@ -351,8 +351,8 @@ class Pref_Prefs extends Handler_Protected {
print "</table>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"otpdisable\">";
+ print_hidden("op", "pref-prefs");
+ print_hidden("method", "otpdisable");
print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
__("Disable OTP")."</button>";
@@ -371,8 +371,8 @@ class Pref_Prefs extends Handler_Protected {
print "<form dojoType=\"dijit.form.Form\" id=\"changeOtpForm\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"otpenable\">";
+ print_hidden("op", "pref-prefs");
+ print_hidden("method", "otpenable");
print "<script type=\"dojo/method\" event=\"onSubmit\" args=\"evt\">
evt.preventDefault();
@@ -658,7 +658,7 @@ class Pref_Prefs extends Handler_Protected {
$listed_boolean_prefs = htmlspecialchars(join(",", $listed_boolean_prefs));
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"boolean_prefs\" value=\"$listed_boolean_prefs\">";
+ print_hidden("boolean_prefs", "$listed_boolean_prefs");
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION,
"hook_prefs_tab_section", "prefPrefsPrefsInside");
@@ -666,8 +666,8 @@ class Pref_Prefs extends Handler_Protected {
print '</div>'; # inside pane
print '<div dojoType="dijit.layout.ContentPane" region="bottom">';
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"saveconfig\">";
+ print_hidden("op", "pref-prefs");
+ print_hidden("method", "saveconfig");
print "<div dojoType=\"dijit.form.ComboButton\" type=\"submit\">
<span>".__('Save configuration')."</span>
@@ -734,8 +734,8 @@ class Pref_Prefs extends Handler_Protected {
}
</script>";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setplugins\">";
+ print_hidden("op", "pref-prefs");
+ print_hidden("method", "setplugins");
print "<table width='100%' class='prefPluginsList'>";
@@ -975,9 +975,9 @@ class Pref_Prefs extends Handler_Protected {
print_notice(T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. <a target=\"_blank\" class=\"visibleLink\" href=\"%s\">This file</a> can be used as a baseline.", "css/tt-rss.css"));
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setpref\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"key\" value=\"USER_STYLESHEET\">";
+ print_hidden("op", "rpc");
+ print_hidden("method", "setpref");
+ print_hidden("key", "USER_STYLESHEET");
print "<table width='100%'><tr><td>";
print "<textarea dojoType=\"dijit.form.SimpleTextarea\"
diff --git a/classes/pref/users.php b/classes/pref/users.php
index 164935b23..f211a8f2f 100644
--- a/classes/pref/users.php
+++ b/classes/pref/users.php
@@ -27,9 +27,9 @@ class Pref_Users extends Handler_Protected {
$id = (int) $this->dbh->escape_string($_REQUEST["id"]);
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$id\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-users\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
+ print_hidden("id", "$id");
+ print_hidden("op", "pref-users");
+ print_hidden("method", "editSave");
$result = $this->dbh->query("SELECT * FROM ttrss_users WHERE id = '$id'");
@@ -43,7 +43,7 @@ class Pref_Users extends Handler_Protected {
print "<div class=\"dlgSecCont\">";
if ($sel_disabled) {
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"login\" value=\"$login\">";
+ print_hidden("login", "$login");
}
print "<input size=\"30\" style=\"font-size : 16px\"
@@ -64,7 +64,7 @@ class Pref_Users extends Handler_Protected {
} else {
print_select_hash("", $access_level, $access_level_names,
"dojoType=\"dijit.form.Select\" $sel_disabled");
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"access_level\" value=\"$access_level\">";
+ print_hidden("access_level", "$access_level");
}
print "<hr/>";