mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-26 19:51:28 +00:00
replace a few more controls to new style
This commit is contained in:
@@ -222,11 +222,13 @@ class Af_Proxy_Http extends Plugin {
|
||||
print \Controls\hidden_tag("method", "save");
|
||||
print \Controls\hidden_tag("plugin", "af_proxy_http");
|
||||
|
||||
$proxy_all = $this->host->get($this, "proxy_all");
|
||||
print_checkbox("proxy_all", $proxy_all);
|
||||
$proxy_all = sql_bool_to_bool($this->host->get($this, "proxy_all"));
|
||||
print \Controls\checkbox_tag("proxy_all", $proxy_all);
|
||||
print " <label for=\"proxy_all\">" . __("Enable proxy for all remote images.") . "</label><br/>";
|
||||
|
||||
print "<p>"; print_button("submit", __("Save"));
|
||||
print "<hr/>";
|
||||
|
||||
print \Controls\submit_tag(__("Save"));
|
||||
|
||||
print "</form>";
|
||||
|
||||
@@ -234,7 +236,7 @@ class Af_Proxy_Http extends Plugin {
|
||||
}
|
||||
|
||||
function save() {
|
||||
$proxy_all = checkbox_to_sql_bool($_POST["proxy_all"]);
|
||||
$proxy_all = checkbox_to_sql_bool($_POST["proxy_all"] ?? "");
|
||||
|
||||
$this->host->set($this, "proxy_all", $proxy_all);
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ class Af_Psql_Trgm extends Plugin {
|
||||
|
||||
$similarity = $this->host->get($this, "similarity", $this->default_similarity);
|
||||
$min_title_length = $this->host->get($this, "min_title_length", $this->default_min_length);
|
||||
$enable_globally = $this->host->get($this, "enable_globally");
|
||||
$enable_globally = sql_bool_to_bool($this->host->get($this, "enable_globally"));
|
||||
|
||||
print "<form dojoType=\"dijit.form.Form\">";
|
||||
|
||||
@@ -186,13 +186,14 @@ class Af_Psql_Trgm extends Plugin {
|
||||
print "</fieldset><fieldset>";
|
||||
|
||||
print "<label class='checkbox'>";
|
||||
print_checkbox("enable_globally", $enable_globally);
|
||||
print \Controls\checkbox_tag("enable_globally", $enable_globally);
|
||||
print " " . __("Enable for all feeds:");
|
||||
print "</label>";
|
||||
|
||||
print "</fieldset>";
|
||||
|
||||
print_button("submit", __("Save"), "class='alt-primary'");
|
||||
print "<hr/>";
|
||||
print \Controls\submit_tag(__("Save"));
|
||||
print "</form>";
|
||||
|
||||
/* cleanup */
|
||||
@@ -202,6 +203,7 @@ class Af_Psql_Trgm extends Plugin {
|
||||
$this->host->set($this, "enabled_feeds", $enabled_feeds);
|
||||
|
||||
if (count($enabled_feeds) > 0) {
|
||||
print "<hr/>";
|
||||
print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>";
|
||||
|
||||
print "<ul class=\"panel panel-scrollable list list-unstyled\">";
|
||||
|
||||
@@ -18,7 +18,7 @@ class Af_Readability extends Plugin {
|
||||
}
|
||||
|
||||
function save() {
|
||||
$enable_share_anything = checkbox_to_sql_bool($_POST["enable_share_anything"]);
|
||||
$enable_share_anything = checkbox_to_sql_bool($_POST["enable_share_anything"] ?? "");
|
||||
|
||||
$this->host->set($this, "enable_share_anything", $enable_share_anything);
|
||||
|
||||
@@ -29,11 +29,6 @@ class Af_Readability extends Plugin {
|
||||
{
|
||||
$this->host = $host;
|
||||
|
||||
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
|
||||
user_error("af_readability requires PHP 7.0", E_USER_WARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
$host->add_hook($host::HOOK_ARTICLE_FILTER, $this);
|
||||
$host->add_hook($host::HOOK_PREFS_TAB, $this);
|
||||
$host->add_hook($host::HOOK_PREFS_EDIT_FEED, $this);
|
||||
@@ -91,16 +86,18 @@ class Af_Readability extends Plugin {
|
||||
print \Controls\hidden_tag("method", "save");
|
||||
print \Controls\hidden_tag("plugin", "af_readability");
|
||||
|
||||
$enable_share_anything = $this->host->get($this, "enable_share_anything");
|
||||
$enable_share_anything = sql_bool_to_bool($this->host->get($this, "enable_share_anything"));
|
||||
|
||||
print "<fieldset>";
|
||||
print "<label class='checkbox'> ";
|
||||
print_checkbox("enable_share_anything", $enable_share_anything);
|
||||
print \Controls\checkbox_tag("enable_share_anything", $enable_share_anything);
|
||||
print " " . __("Provide full-text services to core code (bookmarklets) and other plugins");
|
||||
print "</label>";
|
||||
print "</fieldset>";
|
||||
|
||||
print_button("submit", __("Save"), "class='alt-primary'");
|
||||
print "<hr/>";
|
||||
|
||||
print \Controls\submit_tag(__("Save"));
|
||||
print "</form>";
|
||||
|
||||
/* cleanup */
|
||||
@@ -114,6 +111,7 @@ class Af_Readability extends Plugin {
|
||||
$this->host->set($this, "append_feeds", $append_feeds);
|
||||
|
||||
if (count($enabled_feeds) > 0) {
|
||||
print "<hr/>";
|
||||
print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>";
|
||||
|
||||
print "<ul class='panel panel-scrollable list list-unstyled'>";
|
||||
|
||||
@@ -64,32 +64,33 @@ class Af_RedditImgur extends Plugin {
|
||||
|
||||
print "<fieldset class='narrow'>";
|
||||
print "<label class='checkbox'>";
|
||||
print_checkbox("enable_readability", $enable_readability);
|
||||
print \Controls\checkbox_tag("enable_readability", $enable_readability);
|
||||
print " " . __("Extract missing content using Readability (requires af_readability)") . "</label>";
|
||||
print "</fieldset>";
|
||||
|
||||
print "<fieldset class='narrow'>";
|
||||
print "<label class='checkbox'>";
|
||||
print_checkbox("enable_content_dupcheck", $enable_content_dupcheck);
|
||||
print \Controls\checkbox_tag("enable_content_dupcheck", $enable_content_dupcheck);
|
||||
print " " . __("Enable additional duplicate checking") . "</label>";
|
||||
print "</fieldset>";
|
||||
|
||||
print "<fieldset class='narrow'>";
|
||||
print "<label class='checkbox'>";
|
||||
print_checkbox("reddit_to_teddit", $reddit_to_teddit);
|
||||
print \Controls\checkbox_tag("reddit_to_teddit", $reddit_to_teddit);
|
||||
print " " . T_sprintf("Rewrite Reddit URLs to %s",
|
||||
"<a target=\"_blank\" href=\"https://teddit.net/about\">Teddit</a>") . "</label>";
|
||||
|
||||
print_button("submit", __("Save"), 'class="alt-primary"');
|
||||
print "<hr/>";
|
||||
print \Controls\submit_tag(__("Save"));
|
||||
print "</form>";
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
function save() {
|
||||
$enable_readability = checkbox_to_sql_bool($_POST["enable_readability"]);
|
||||
$enable_content_dupcheck = checkbox_to_sql_bool($_POST["enable_content_dupcheck"]);
|
||||
$reddit_to_teddit = checkbox_to_sql_bool($_POST["reddit_to_teddit"]);
|
||||
$enable_readability = checkbox_to_sql_bool($_POST["enable_readability"] ?? "");
|
||||
$enable_content_dupcheck = checkbox_to_sql_bool($_POST["enable_content_dupcheck"] ?? "");
|
||||
$reddit_to_teddit = checkbox_to_sql_bool($_POST["reddit_to_teddit"] ?? "");
|
||||
|
||||
$this->host->set($this, "enable_readability", $enable_readability, false);
|
||||
$this->host->set($this, "reddit_to_teddit", $reddit_to_teddit, false);
|
||||
|
||||
Reference in New Issue
Block a user