From abfd552962598aa5a134540fe65bc82a1cd3f252 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 22 Feb 2019 12:48:02 +0300 Subject: [PATCH] plugins: update markup --- plugins/af_psql_trgm/init.php | 43 +++++++++++++---------- plugins/af_readability/init.php | 62 ++++++++++++++++++--------------- 2 files changed, 59 insertions(+), 46 deletions(-) diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index f8e4db834..697fbb9c6 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -163,31 +163,38 @@ class Af_Psql_Trgm extends Plugin { print_hidden("method", "save"); print_hidden("plugin", "af_psql_trgm"); - print "

" . __("PostgreSQL trigram extension returns string similarity as a floating point number (0-1). Setting it too low might produce false positives, zero disables checking.") . "

"; - print_notice("Enable the plugin for specific feeds in the feed editor."); + print "

" . __("Global settings") . "

"; - print "

" . __("Global settings") . "

"; + print_notice("Enable for specific feeds in the feed editor."); - print ""; + print "
"; - print "
"; - print ""; - print ""; - print ""; - print ""; - print ""; + print " " . __("Enable for all feeds:"); + print ""; - print "
" . __("Minimum similarity:") . " -
" . __("Minimum title length:") . " - " . __("Minimum similarity:") . " "; + print ""; + + print "
" . + __("PostgreSQL trigram extension returns string similarity as a floating point number (0-1). Setting it too low might produce false positives, zero disables checking.") . + "
"; + + print "
"; + + print " "; + print "
" . __("Enable for all feeds:") . ""; + required=\"1\" name=\"min_title_length\" value=\"$min_title_length\">"; + + print "
"; + + print "
"; + print ""; - print "

"; print_button("submit", __("Save")); + print_button("submit", __("Save"), "class='alt-primary'"); print ""; $enabled_feeds = $this->host->get($this, "enabled_feeds"); diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 694c3782e..117646c30 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -44,18 +44,20 @@ class Af_Readability extends Plugin { function hook_prefs_tab($args) { if ($args != "prefFeeds") return; - print "

extension ".__('Readability settings (af_readability)')."\">"; if (version_compare(PHP_VERSION, '5.6.0', '<')) { print_error("This plugin requires PHP version 5.6."); - } + } else { - print_notice("Enable the plugin for specific feeds in the feed editor."); + print "

" . __("Global settings") . "

"; - print "
"; + print_notice("Enable for specific feeds in the feed editor."); - print ""; - print_hidden("op", "pluginhandler"); - print_hidden("method", "save"); - print_hidden("plugin", "af_readability"); + print_hidden("op", "pluginhandler"); + print_hidden("method", "save"); + print_hidden("plugin", "af_readability"); - $enable_share_anything = $this->host->get($this, "enable_share_anything"); + $enable_share_anything = $this->host->get($this, "enable_share_anything"); - print_checkbox("enable_share_anything", $enable_share_anything); - print " "; + print "
"; + print ""; + print "
"; - print "

"; print_button("submit", __("Save")); - print "

"; + print print_button("submit", __("Save"), "class='alt-primary'"); + print ""; - $enabled_feeds = $this->host->get($this, "enabled_feeds"); - if (!is_array($enabled_feeds)) $enabled_feeds = array(); + $enabled_feeds = $this->host->get($this, "enabled_feeds"); + if (!is_array($enabled_feeds)) $enabled_feeds = array(); - $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds); - $this->host->set($this, "enabled_feeds", $enabled_feeds); + $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds); + $this->host->set($this, "enabled_feeds", $enabled_feeds); - if (count($enabled_feeds) > 0) { - print "

" . __("Currently enabled for (click to edit):") . "

"; + if (count($enabled_feeds) > 0) { + print "

" . __("Currently enabled for (click to edit):") . "

"; - print ""; } - print ""; + } print "
"; @@ -115,9 +122,8 @@ class Af_Readability extends Plugin { print "
"; - print ""; + print ""; print "
";