summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/docs/note.php2
-rw-r--r--views/new-bookmark.php12
-rw-r--r--views/new-post.php4
-rw-r--r--views/settings.php18
4 files changed, 25 insertions, 11 deletions
diff --git a/views/docs/note.php b/views/docs/note.php
index 654c478..737e811 100644
--- a/views/docs/note.php
+++ b/views/docs/note.php
@@ -30,7 +30,7 @@
<li><code>location</code> - If you check the "location" box, then this property will be a Geo URI with the location the browser detected. You will see a preview of the value in the note interface along with a map.</li>
<li><code>photo</code> or <code>photo[]</code> - If your server supports a Media Endpoint, this will be set to the URL that your endpoint returned when it uploaded the photo. Otherwise, this will be one of the parts in the multipart request with the image file itself.</li>
<li><code>mp-slug</code> - If you enter a slug, this will be sent in the request. You can customize the name of this property in settings.</li>
- <li><code>syndicate-to[]</code> - (Note: this is deprecated and will be replaced with "mp-syndicate-to[]" soon) Each syndication destination selected will be sent in this property. The values will be the <code>uid</code> that your endpoint returns. See <a href="/docs/syndication">Syndication</a> for more details.</li>
+ <li><code>mp-syndicate-to[]</code> - Each syndication destination selected will be sent in this property. The values will be the <code>uid</code> that your endpoint returns. See <a href="/docs/syndication">Syndication</a> for more details. (If you are using an older Micropub endpoint that expects <code>syndicate-to</code>, you can customize this property in the settings.)</li>
</ul>
<hr>
diff --git a/views/new-bookmark.php b/views/new-bookmark.php
index 32e9043..068422f 100644
--- a/views/new-bookmark.php
+++ b/views/new-bookmark.php
@@ -13,27 +13,27 @@
<form role="form" style="margin-top: 20px;" id="note_form">
<div class="form-group">
- <label for="note_bookmark">Bookmark URL (<code>bookmark-of</code>)</label>
+ <label for="note_bookmark">Bookmark URL</label>
<input type="text" id="note_bookmark" value="<?= $this->bookmark_url ?>" class="form-control">
</div>
<div class="form-group">
- <label for="note_name">Name (<code>name</code>)</label>
+ <label for="note_name">Name</label>
<input type="text" id="note_name" value="<?= $this->bookmark_name ?>" class="form-control">
</div>
<div class="form-group">
- <label for="note_content">Content (<code>content</code>, optional)</label>
+ <label for="note_content">Content</label>
<textarea id="note_content" value="" class="form-control" style="height: 5em;"><?= $this->bookmark_content ?></textarea>
</div>
<div class="form-group">
- <label for="note_category">Tags (<code>category</code>)</label>
+ <label for="note_category">Tags</label>
<input type="text" id="note_category" value="<?= $this->bookmark_tags ?>" class="form-control" placeholder="e.g. web, personal">
</div>
<div class="form-group">
- <label for="note_syndicate-to">Syndicate (<code>syndicate-to</code>) <a href="javascript:reload_syndications()">refresh</a></label>
+ <label for="note_syndicate-to">Syndicate <a href="javascript:reload_syndications()">refresh</a></label>
<div id="syndication-container">
<?php
if($this->syndication_targets) {
@@ -90,7 +90,7 @@ $(function(){
name: $("#note_name").val(),
content: $("#note_content").val(),
category: csv_to_array($("#note_category").val()),
- 'syndicate-to': syndications
+ '<?= $this->user->micropub_syndicate_field ?>': syndications
}, function(response){
if(response.location != false) {
diff --git a/views/new-post.php b/views/new-post.php
index 7059c5e..57a2ffa 100644
--- a/views/new-post.php
+++ b/views/new-post.php
@@ -429,7 +429,7 @@ $(function(){
}
if(syndications.length > 0) {
for(var i in syndications) {
- formData.append("syndicate-to[]", syndications[i]);
+ formData.append("<?= $this->user->micropub_syndicate_field ?>[]", syndications[i]);
}
}
if(v=$("#note_slug").val()) {
@@ -485,7 +485,7 @@ $(function(){
location: $("#note_location").val(),
category: category,
slug: $("#note_slug").val(),
- 'syndicate-to': syndications
+ '<?= $this->user->micropub_syndicate_field ?>': syndications
}, function(data){
var response = JSON.parse(data);
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>