mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-01 07:09:13 +00:00
* 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
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -38,7 +38,7 @@ Plugins.Mail = {
|
||||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhrPost("backend.php", {op: "pluginhandler", plugin: "mail", method: "emailArticle", ids: id}, (transport) => {
|
||||
xhrPost("backend.php", App.getPhArgs("mail", "emailArticle", {ids: id}), (transport) => {
|
||||
dialog.attr('content', transport.responseText);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user