add new matching page
This commit is contained in:
parent
e5e47d5741
commit
6dd8041fe4
3 changed files with 120 additions and 1 deletions
|
@ -55,7 +55,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary"><i class="fas fa-fw fa-check-circle"></i></button>
|
||||
<a href="/match/<?php echo $item["id"]; ?>/" class="btn btn-outline-success" title="match"><i class="fas fa-fw fa-check-circle"></i></a>
|
||||
<!--<a href="/found_item_edit/<?php echo $item["id"]; ?>/" type="button" class="btn btn-outline-secondary"><i class="fas fa-fw fa-edit"></i></a>-->
|
||||
<button type="button" class="btn btn-outline-secondary" data-toggle="modal" data-target="#exampleModal"
|
||||
onclick='fill_edit_form(<?php echo json_encode($item); ?>);' title="edit">
|
||||
|
|
81
templates/match.php
Normal file
81
templates/match.php
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: jedi
|
||||
* Date: 12/27/18
|
||||
* Time: 1:49 PM
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Breadcrumbs-->
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="#">Dashboard</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">Matches</li>
|
||||
<li class="breadcrumb-item active">Add</li>
|
||||
</ol>
|
||||
|
||||
<div id="alertmessage" class="collapse alert alert-danger" role="alert">
|
||||
This is a danger alert—check it out!
|
||||
</div>
|
||||
|
||||
|
||||
<div id="successmessage" class="collapse alert alert-success" role="alert">
|
||||
A simple success alert—check it out!
|
||||
</div>
|
||||
|
||||
<!-- Area Chart Example-->
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-plus"></i>
|
||||
Insert Item into DB
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" id="match_form" action="/action.php?action=tinder">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="FUND-ID" name="found_id" <?php if(isset($_GET["id"])) echo "value=\"".$_GET["id"]."\" readonly" ?>></div>
|
||||
<div class="form-group">
|
||||
<label>Only fill out one of these:</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="LOST-ID" name="lost_id">
|
||||
<input type="text" class="form-control" placeholder="TICKET-ID" name="ticket_id">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="form-control" onclick="add_match(); return false;">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function add_match(){
|
||||
$.post( "/ajax.php?action=add_match", $( "#match_form" ).serialize() ).done(function( data ) {
|
||||
reply = JSON.parse(data);
|
||||
if(reply.status == "ok"){
|
||||
//update_found_table();
|
||||
$("#alertmessage").collapse('hide');
|
||||
$("#successmessage").html(reply.message).collapse('show');
|
||||
setTimeout(function(){ window.location.assign("/table/") }, 1000);
|
||||
}else{
|
||||
$("#successmessage").collapse('hide');
|
||||
$("#alertmessage").html(reply.message).collapse('show');
|
||||
}
|
||||
}).fail(function() {
|
||||
$("#successmessage").collapse('hide');
|
||||
$("#alertmessage").html("error").collapse('show');
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
|
||||
<!-- /.content-wrapper -->
|
Loading…
Add table
Add a link
Reference in a new issue