summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2019-10-19 21:19:48 +0100
committerAaron Parecki <aaron@parecki.com>2019-10-19 21:19:48 +0100
commite8b68115a4d5ba488832dbf45f149935635510fe (patch)
tree92e3265c37f6d584b74f1b15c65420ed0d3c482a /views
parentcbbf10c7f30dbf5e82e3cef71e3fc864aba5b851 (diff)
drop flight tracking stuff
the API dropped their free tier
Diffstat (limited to 'views')
-rw-r--r--views/new-flight.php54
1 files changed, 0 insertions, 54 deletions
diff --git a/views/new-flight.php b/views/new-flight.php
deleted file mode 100644
index da3f6bf..0000000
--- a/views/new-flight.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<div class="narrow">
- <?= partial('partials/header') ?>
-
- <div style="clear: both;" class="notice-pad">
- <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">
-
- <div class="form-group">
- <label>Flight Number (e.g. <code>AS387</code>)</label>
- <input type="text" id="flight" class="form-control" value="AS387">
- </div>
-
- <div style="float: right; margin-top: 6px;">
- <button class="btn btn-success" id="btn_post">Check In</button>
- </div>
-
- </form>
-
-</div>
-<script>
-$(function(){
- $("#btn_post").click(function(){
- if($(this).text() == "Find Flight") {
- $.post("/flight", {
- action: "find",
- flight: $("#flight").val()
- }, function(data){
-
- });
- } else {
- $("#btn_post").addClass("loading disabled").text("Working...");
- $.post("/flight", {
- action: "checkin",
- flight: $("#flight").val()
- }, function(response){
- if(response.location != false) {
- $("#test_success").removeClass('hidden');
- $("#test_error").addClass('hidden');
- $("#post_href").attr("href", response.location);
- $("#note_form").addClass("hidden");
- } else {
- $("#test_success").addClass('hidden');
- $("#test_error").removeClass('hidden');
- $("#btn_post").removeClass("loading disabled").text("Check In");
- }
- });
- }
- return false;
- });
-});
-</script>