summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-18 12:43:05 +0300
committerAndrew Dolgov <[email protected]>2021-02-18 12:43:05 +0300
commit31674f94a73b13823547542a5d44efc647f392ba (patch)
treea009620c1f9eba3f28de9df6ae8f15a31b8c8bfa
parentcdc427433a9a2b6bf2583d7ee93d24bcbae9913c (diff)
markup cleanup
-rw-r--r--init.php52
1 files changed, 23 insertions, 29 deletions
diff --git a/init.php b/init.php
index 14d8350..e768bc3 100644
--- a/init.php
+++ b/init.php
@@ -372,43 +372,37 @@ class Api_Resize_Media extends Plugin {
if ($args != "prefFeeds") return;
$force_width = (int) $this->host->get($this, "force_width", 0);
+ ?>
- print "<div dojoType='dijit.layout.AccordionPane'
- title=\"<i class='material-icons'>photo</i> ".$this->__( 'Resize media on the fly (api_resize_media)')."\">";
+ <div dojoType='dijit.layout.AccordionPane'
+ title="<i class='material-icons'>photo</i> <?= $this->__( 'Resize media on the fly (api_resize_media)') ?>">
- 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") ?>
- print "<h2>" . $this->__( "Global settings") . "</h2>";
-
- print "<fieldset>";
-
- print "<label>".$this->__( "Also resize in web UI (width, 0 - disables)")."</label>";
- print "<input dojoType='dijit.form.NumberSpinner'
- required='1' name='force_width' id='api_resize_force_width' value='$force_width'> " . $this->__('pixels');
+ <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 "</fieldset>";
+ <fieldset>
+ <label><?= $this->__( "Also resize in web UI (width, 0 - disables)") ?></label>
+ <input dojoType='dijit.form.NumberSpinner'
+ required='1' name='force_width' id='api_resize_force_width' value="<?= $force_width ?>"> <?= $this->__('pixels') ?>
+ </fieldset>
- print \Controls\submit_tag($this->__( "Save"));
+ <hr/>
- print "</form>";
+ <?= \Controls\submit_tag($this->__( "Save")) ?>
+ </form>
- print "</div>";
+ </div>
+ <?php
}
function save() {