post_to_telegram/pref_template.html

35 lines
1.6 KiB
HTML

<style>
#widget_discord_webhook_url {
width: 30em;
}
</style>
<div dojoType="dijit.layout.AccordionPane" title="<i class='material-icons'>extension</i> Discord Webhook">
<p>
Instructions for how to create a webhook URL for a server channel can be found <a href="https://support.discordapp.com/hc/en-us/articles/228383668">here</a>.
</p>
<form dojoType="dijit.form.Form">
<script type="dojo/method" event="onSubmit" args="evt">
evt.preventDefault();
if (this.validate()) {
xhr.post('backend.php', this.getValues(), (reply) => {
Notify.info(reply);
});
//this.reset();
}
</script>
<input dojoType="dijit.form.TextBox" type="hidden" name="op" value="pluginhandler">
<input dojoType="dijit.form.TextBox" type="hidden" name="method" value="save">
<input dojoType="dijit.form.TextBox" type="hidden" name="plugin" value="discord_webhook">
<fieldset class="prefs">
<label>Webhook URL:</label>
<input dojoType="dijit.form.ValidationTextBox" id="discord_webhook_url" type="url" required="1" pattern="{discord_api_url}.+" placeholder="{discord_api_url}..." name="webhook_url" value="{webhook_url}">
</fieldset>
<fieldset class="prefs">
<label>Include characters of article content:</label>
<input dojoType="dijit.form.NumberSpinner" constraints="{min:0}" id="discord_content_length" placeholder="{default_content_length}" name="content_length" value="{content_length}">
</fieldset>
<br><br>
<button dojoType="dijit.form.Button" type="submit">Save</button>
</form>
</div>