summaryrefslogtreecommitdiff
path: root/views/settings.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-01-17 09:24:41 -0800
committerAaron Parecki <aaron@parecki.com>2017-01-17 09:24:41 -0800
commit0e8ee9973a550a3ab0a2069d9a12b683651b7d9b (patch)
treea6f5449d8dd09e815ad659396a1aaa350354215e /views/settings.php
parent3bdcd009c8817df5275041d5c4d72c716d660456 (diff)
use `mp-syndicate-to` by default, add setting
* adds setting to choose the property to use for the syndication targets * all existing users default to the old value `syndicate-to` * new users default to `mp-syndicate-to` closes #66
Diffstat (limited to 'views/settings.php')
-rw-r--r--views/settings.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/views/settings.php b/views/settings.php
index 2662eb0..5895718 100644
--- a/views/settings.php
+++ b/views/settings.php
@@ -36,16 +36,24 @@
<p>You can customize some of the properties that are sent in the Micropub request to work with your specific endpoint.</p>
- <table class="table table-condensed">
+ <table class="table table-condensed" width="100%">
<tr>
<td>Slug</td>
- <td>
+ <td width="160">
<div style="margin-bottom:4px;"><input type="text" id="slug-field-name" value="<?= $this->user->micropub_slug_field ?>" placeholder="mp-slug" class="form-control"></div>
<div><input type="button" class="btn btn-primary" value="Save" id="save-slug-field"></div>
</td>
<td>Choose the name of the field that the slug will be sent in. This should be set to <code>mp-slug</code> unless your endpoint is using a custom property or the deprecated <code>slug</code> property.</td>
</tr>
<tr>
+ <td>Syndication</td>
+ <td>
+ <div style="margin-bottom:4px;"><input type="text" id="syndicate-to-field-name" value="<?= $this->user->micropub_syndicate_field ?>" placeholder="mp-syndicate-to" class="form-control"></div>
+ <div><input type="button" class="btn btn-primary" value="Save" id="save-syndicate-to-field"></div>
+ </td>
+ <td>Choose the name of the field that the syndication values will be sent in. This should be set to <code>mp-syndicate-to</code> unless your endpoint is using the deprecated <code>syndicate-to</code> property.</td>
+ </tr>
+ <tr>
<td>Send HTML Content</td>
<td><input type="checkbox" id="send-html-content" <?= $this->user->micropub_optin_html_content ? 'checked="checked"' : '' ?>></td>
<td>When checked, content from Quill's HTML editor will be sent in a property called <code>content[html]</code> rather than just <code>content</code>. See the <a href="https://www.w3.org/TR/micropub/#new-article-with-html">Micropub specification</a> for more details.</td>
@@ -91,5 +99,11 @@ $(function(){
});
});
+ $("#save-syndicate-to-field").click(function(){
+ $.post("/settings/save", {
+ syndicate_field: $("#syndicate-to-field-name").val()
+ });
+ });
+
});
</script>