|
|
|
@ -209,39 +209,37 @@ class Af_Proxy_Http extends Plugin {
|
|
|
|
|
|
|
|
|
|
function hook_prefs_tab($args) {
|
|
|
|
|
if ($args != "prefFeeds") return;
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
print "<div dojoType=\"dijit.layout.AccordionPane\"
|
|
|
|
|
title=\"<i class='material-icons'>extension</i> ".__('Image proxy settings (af_proxy_http)')."\">";
|
|
|
|
|
<div dojoType="dijit.layout.AccordionPane"
|
|
|
|
|
title="<i class='material-icons'>extension</i> <?= __('Image proxy settings (af_proxy_http)') ?>">
|
|
|
|
|
|
|
|
|
|
print "<form dojoType=\"dijit.form.Form\">";
|
|
|
|
|
<form dojoType="dijit.form.Form">
|
|
|
|
|
|
|
|
|
|
print "<script type=\"dojo/method\" event=\"onSubmit\" args=\"evt\">
|
|
|
|
|
evt.preventDefault();
|
|
|
|
|
if (this.validate()) {
|
|
|
|
|
console.log(dojo.objectToQuery(this.getValues()));
|
|
|
|
|
new Ajax.Request('backend.php', {
|
|
|
|
|
parameters: dojo.objectToQuery(this.getValues()),
|
|
|
|
|
onComplete: function(transport) {
|
|
|
|
|
Notify.info(transport.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//this.reset();
|
|
|
|
|
}
|
|
|
|
|
</script>";
|
|
|
|
|
|
|
|
|
|
print \Controls\pluginhandler_tags($this, "save");
|
|
|
|
|
<?= \Controls\pluginhandler_tags($this, "save") ?>
|
|
|
|
|
|
|
|
|
|
$proxy_all = sql_bool_to_bool($this->host->get($this, "proxy_all"));
|
|
|
|
|
print \Controls\checkbox_tag("proxy_all", $proxy_all);
|
|
|
|
|
print " <label for=\"proxy_all\">" . __("Enable proxy for all remote images.") . "</label><br/>";
|
|
|
|
|
|
|
|
|
|
print "<hr/>";
|
|
|
|
|
<script type="dojo/method" event="onSubmit" args="evt">
|
|
|
|
|
evt.preventDefault();
|
|
|
|
|
if (this.validate()) {
|
|
|
|
|
xhrPost("backend.php", this.getValues(), (transport) => {
|
|
|
|
|
Notify.info(transport.responseText);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
print \Controls\submit_tag(__("Save"));
|
|
|
|
|
<fieldset>
|
|
|
|
|
<label class="checkbox">
|
|
|
|
|
<?= \Controls\checkbox_tag("proxy_all", $this->host->get($this, "proxy_all")) ?>
|
|
|
|
|
<?= __("Enable proxy for all remote images.") ?>
|
|
|
|
|
</label>
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
print "</form>";
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
|
<?= \Controls\submit_tag(__("Save")) ?>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function save() {
|
|
|
|
|