summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/email.php9
-rw-r--r--views/event.php4
-rw-r--r--views/new-bookmark.php4
-rw-r--r--views/new-code.php4
-rw-r--r--views/new-favorite.php4
-rw-r--r--views/new-flight.php4
-rw-r--r--views/new-itinerary.php4
-rw-r--r--views/new-post.php20
-rw-r--r--views/new-repost.php4
-rw-r--r--views/review.php6
10 files changed, 26 insertions, 37 deletions
diff --git a/views/email.php b/views/email.php
index 1f97905..e3464f6 100644
--- a/views/email.php
+++ b/views/email.php
@@ -19,11 +19,4 @@
<p>If you attach a photo to your email or MMS, it will be sent to your Micropub endpoint. (Only one photo is currently supported.)</p>
</div>
- <div>
- <?php if($this->test_response): ?>
- <h4>Last response from your Micropub endpoint</h4>
- <pre id="test_response" style="width: 100%; min-height: 280px;"><?= htmlspecialchars($this->test_response) ?></pre>
- <?php endif; ?>
- </div>
-
-</div> \ No newline at end of file
+</div>
diff --git a/views/event.php b/views/event.php
index 3c26f73..81742d8 100644
--- a/views/event.php
+++ b/views/event.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;">
- <div class="alert alert-success hidden" id="test_success"><strong>Success! We found a Location header in the response!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/new-bookmark.php b/views/new-bookmark.php
index 0181dae..f50801a 100644
--- a/views/new-bookmark.php
+++ b/views/new-bookmark.php
@@ -6,8 +6,8 @@
</div>
<div style="clear: both;">
- <div class="alert alert-success hidden" id="test_success"><strong>Success! We found a Location header in the response!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/new-code.php b/views/new-code.php
index 96a93d3..4201816 100644
--- a/views/new-code.php
+++ b/views/new-code.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;" class="notice-pad">
- <div class="alert alert-success hidden" id="test_success"><strong>Success!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/new-favorite.php b/views/new-favorite.php
index 72de412..f457e3b 100644
--- a/views/new-favorite.php
+++ b/views/new-favorite.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;" class="notice-pad">
- <div class="alert alert-success hidden" id="test_success"><strong>Success!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/new-flight.php b/views/new-flight.php
index 031b86f..da3f6bf 100644
--- a/views/new-flight.php
+++ b/views/new-flight.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;" class="notice-pad">
- <div class="alert alert-success hidden" id="test_success"><strong>Success!</strong><br>Your checkin should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/new-itinerary.php b/views/new-itinerary.php
index 14deb65..e40ec2a 100644
--- a/views/new-itinerary.php
+++ b/views/new-itinerary.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;" class="notice-pad">
- <div class="alert alert-success hidden" id="test_success"><strong>Success! We found a Location header in the response!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/new-post.php b/views/new-post.php
index ec74b28..3455644 100644
--- a/views/new-post.php
+++ b/views/new-post.php
@@ -117,20 +117,15 @@
<button class="btn btn-success" id="btn_post">Post</button>
</form>
- <div class="alert alert-success hidden" id="test_success"><strong>Success! We found a Location header in the response!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
-
- <div id="last_request_container" style="display: none;">
- <h4>Request made to your Micropub endpoint</h4>
- <pre id="test_request" style="width: 100%; min-height: 140px;"></pre>
+ <div id="test_response_container" class="hidden">
+ <h4>Micropub Response</h4>
+ <p>Below is the response from your Micropub endpoint. This may contain helpful information that can be used to troubleshoot the issue.</p>
+ <pre id="test_response" style="width: 100%; min-height: 240px;"></pre>
</div>
- <?php if($this->test_response): ?>
- <h4>Last response from your Micropub endpoint <span id="last_response_date">(<?= relative_time($this->response_date) ?>)</span></h4>
- <?php endif; ?>
- <pre id="test_response" class="<?= $this->test_response ? '' : 'hidden' ?>" style="width: 100%; min-height: 240px;"><?= htmlspecialchars($this->test_response) ?></pre>
-
<hr>
<div style="text-align: right;">
<a href="/add-to-home?start">Add to Home Screen</a>
@@ -825,7 +820,8 @@ $(function(){
window.location = response.location;
// console.log(response.location);
} else {
- $("#test_response").html(response.response).removeClass('hidden');
+ $("#test_response").html(response.response);
+ $("#test_response_container").removeClass('hidden');
$("#test_success").addClass('hidden');
$("#test_error").removeClass('hidden');
}
diff --git a/views/new-repost.php b/views/new-repost.php
index 4ef84db..95cc770 100644
--- a/views/new-repost.php
+++ b/views/new-repost.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;" class="notice-pad">
- <div class="alert alert-success hidden" id="test_success"><strong>Success!</strong><br>Your post should be on your website now!<br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="test_error"><strong>Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
diff --git a/views/review.php b/views/review.php
index d364666..f77ffb8 100644
--- a/views/review.php
+++ b/views/review.php
@@ -2,8 +2,8 @@
<?= partial('partials/header') ?>
<div style="clear: both;">
- <div class="alert alert-success hidden" id="post_success"><strong>Success! Your post should be on your website now!</strong><br><a href="" id="post_href">View your post</a></div>
- <div class="alert alert-danger hidden" id="post_error"><strong>There was a problem saving your post. Your endpoint did not return a Location header.</strong><br>See <a href="/creating-a-micropub-endpoint">Creating a Micropub Endpoint</a> for more information.</div>
+ <div class="alert alert-success hidden" id="test_success"><strong>Success! </strong><a href="" id="post_href">View your post</a></div>
+ <div class="alert alert-danger hidden" id="test_error"><strong>Something went wrong!</strong><br>Your Micropub endpoint indicated that something went wrong creating the post.</div>
</div>
<form role="form" style="margin-top: 20px;" id="note_form">
@@ -35,7 +35,7 @@
<div class="row review-content hidden">
<div class="col-xs-12">
<div class="form-group">
- <textarea id="review_content" value="" class="form-control" style="height: 4em;" placeholder="Write your review here"></textarea>
+ <textarea id="review_content" value="" class="form-control" style="height: 4em;" placeholder="Write your review here"></textarea>
<div id="review-html-note">
<input type="checkbox" id="review_is_html" value="1"> Post as HTML
</div>