From 2ac6508fe697ed5e95cc7bf73ffb9e2e0bf0d3fa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Feb 2021 15:53:00 +0300 Subject: mail, mailto: cleanup markup --- plugins/mail/init.php | 150 +++++++++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 69 deletions(-) (limited to 'plugins/mail/init.php') diff --git a/plugins/mail/init.php b/plugins/mail/init.php index 8a0d01aca..bb576a4d9 100644 --- a/plugins/mail/init.php +++ b/plugins/mail/init.php @@ -37,42 +37,44 @@ class Mail extends Plugin { function hook_prefs_tab($args) { if ($args != "prefPrefs") return; - print "
mail ".__('Mail plugin')."\">"; - - print "

" . __("You can set predefined email addressed here (comma-separated list):") . "

"; - - print "
"; - - print ""; + - print \Controls\hidden_tag("op", "pluginhandler"); - print \Controls\hidden_tag("method", "save"); - print \Controls\hidden_tag("plugin", "mail"); +
- $addresslist = $this->host->get($this, "addresslist"); + - print ""; +
- print "

"; + - print "

"; + - print "
"; + + "; - - print \Controls\hidden_tag("op", "pluginhandler"); - print \Controls\hidden_tag("plugin", "mail"); - print \Controls\hidden_tag("method", "sendEmail"); $sth = $this->pdo->prepare("SELECT email, full_name FROM ttrss_users WHERE id = ?"); @@ -107,9 +104,6 @@ class Mail extends Plugin { if (!$user_name) $user_name = $_SESSION['name']; - print \Controls\hidden_tag("from_email", "$user_email"); - print \Controls\hidden_tag("from_name", "$user_name"); - $tpl = new Templator(); $tpl->readTemplateFromFile("email_article_template.txt"); @@ -150,40 +144,58 @@ class Mail extends Plugin { $content = ""; $tpl->generateOutputToString($content); - print ""; - - print "
"; - $addresslist = explode(",", $this->host->get($this, "addresslist")); - print __('To:'); - - print ""; - - print \Controls\select_tag("destination", "", $addresslist, - ["style" => "width: 30em", "required" => 1, "dojoType" => "dijit.form.ComboBox"]); - - print "
"; - - print __('Subject:'); - - print ""; - - print ""; - - print "
"; - - print "
"; - - print ""; - - print ""; + ?> + +
+ + + + + + + + + + +
+
+ + "width: 380px", "required" => 1, "dojoType" => "dijit.form.ComboBox"]) ?> +
+
+ +
+
+ + +
+
+ + + +
+ + +
+ +
+