diff options
author | Andrew Dolgov <[email protected]> | 2021-02-17 21:44:21 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-17 21:44:21 +0300 |
commit | e4609c18efceebb1e021d814f53061ada7f6489a (patch) | |
tree | 0968e0da3dc2d1b4cdc12c2a29549c27dc82ea14 /plugins/mail/init.php | |
parent | b16abc157ee584f4be80a537ee24ec9e5ff25496 (diff) |
* add (disabled) shortcut syntax for plugin methods
* add controls shortcut for pluginhandler tags
* add similar shortcut for frontend
* allow plugins to selectively exclude their methods from CSRF checking
Diffstat (limited to 'plugins/mail/init.php')
-rw-r--r-- | plugins/mail/init.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/mail/init.php b/plugins/mail/init.php index bb576a4d9..4b62d1e64 100644 --- a/plugins/mail/init.php +++ b/plugins/mail/init.php @@ -45,9 +45,7 @@ class Mail extends Plugin { title="<i class='material-icons'>mail</i> <?= __('Mail plugin') ?>"> <form dojoType="dijit.form.Form"> - <?= \Controls\hidden_tag("op", "pluginhandler") ?> - <?= \Controls\hidden_tag("method", "save") ?> - <?= \Controls\hidden_tag("plugin", "mail") ?> + <?= \Controls\pluginhandler_tags($this, "save") ?> <script type="dojo/method" event="onSubmit" args="evt"> evt.preventDefault(); @@ -150,12 +148,10 @@ class Mail extends Plugin { <form dojoType='dijit.form.Form'> - <?= \Controls\hidden_tag("op", "pluginhandler") ?> - <?= \Controls\hidden_tag("plugin", "mail") ?> - <?= \Controls\hidden_tag("method", "sendEmail") ?> + <?= \Controls\pluginhandler_tags($this, "sendemail") ?> - <?= \Controls\hidden_tag("from_email", "$user_email") ?> - <?= \Controls\hidden_tag("from_name", "$user_name") ?> + <?= \Controls\hidden_tag("from_email", $user_email) ?> + <?= \Controls\hidden_tag("from_name", $user_name) ?> <script type='dojo/method' event='onSubmit' args='evt'> evt.preventDefault(); |