summaryrefslogtreecommitdiff
path: root/views/settings.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-01-04 15:26:51 -0800
committerAaron Parecki <aaron@parecki.com>2017-01-04 15:26:51 -0800
commitacafb9192a6402a3f3d60d5e6af11cb4576fc96c (patch)
treed70737a0ee528cff04673ff6b66a1667fbd302bf /views/settings.php
parente7fe68f73e441778f80683383ddb2ffe7a48f85c (diff)
add tags, slug and status field to quill editor
Diffstat (limited to 'views/settings.php')
-rw-r--r--views/settings.php37
1 files changed, 36 insertions, 1 deletions
diff --git a/views/settings.php b/views/settings.php
index 5acc7dd..2662eb0 100644
--- a/views/settings.php
+++ b/views/settings.php
@@ -18,7 +18,7 @@
</tr>
<tr>
<td>media endpoint</td>
- <td><?= $this->user->media_endpoint ? '<code>'.$this->user->media_endpoint.'</code>' : '<a href="https://www.w3.org/TR/micropub/#media-endpoint">no media endpoint</a>' ?></td>
+ <td><?= $this->user->micropub_media_endpoint ? '<code>'.$this->user->micropub_media_endpoint.'</code>' : '<a href="https://www.w3.org/TR/micropub/#media-endpoint">no media endpoint</a>' ?></td>
</tr>
<tr>
<td width="140">access token</td>
@@ -31,6 +31,28 @@
<p>Connecting a Twitter account will automatically "favorite" and "retweet" tweets on Twitter when you favorite and retweet a Twitter URL in Quill.</p>
<input type="button" id="twitter-button" value="Checking" class="btn">
+
+ <h3>Backwards Compatibility</h3>
+
+ <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">
+ <tr>
+ <td>Slug</td>
+ <td>
+ <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>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>
+ </tr>
+ </table>
+
+
</div>
<script>
$(function(){
@@ -56,5 +78,18 @@ $(function(){
}
});
+ $("#send-html-content").click(function(){
+ var enabled = $(this).attr("checked") == "checked";
+ $.post("/settings/save", {
+ html_content: (enabled ? 1 : 0)
+ });
+ });
+
+ $("#save-slug-field").click(function(){
+ $.post("/settings/save", {
+ slug_field: $("#slug-field-name").val()
+ });
+ });
+
});
</script>