From f58c49beaa5e2e0bf924f0ea844ede18abd0bc27 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Feb 2021 18:50:18 +0300 Subject: replace a few more controls to new style --- plugins/af_proxy_http/init.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/af_proxy_http/init.php') diff --git a/plugins/af_proxy_http/init.php b/plugins/af_proxy_http/init.php index b82999281..79d2f5294 100644 --- a/plugins/af_proxy_http/init.php +++ b/plugins/af_proxy_http/init.php @@ -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 " 
"; - print "

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


"; + + print \Controls\submit_tag(__("Save")); print ""; @@ -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); -- cgit v1.2.3