124 lines
3.8 KiB
PHP
124 lines
3.8 KiB
PHP
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
<!-- Recent Members -->
|
|
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
|
|
|
<form method="post" action="?">
|
|
<fieldset>
|
|
<table>
|
|
<tr>
|
|
<td>From</td>
|
|
<td><input type="hidden" id="from" name="from" value="<?= $from ?>"><input type="text" name="autofrom" id="autofrom" class="form-control" style="width:400px;" value="<?= $autofrom ?>"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>To</td>
|
|
<td><input type="hidden" id="to" name="to" value="<?= $to ?>"><input type="text" name="autoto" id="autoto" class="form-control" style="width:400px;" value="<?= $autoto ?>"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Origin Country</td>
|
|
<td><?= $card_from_country ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Dest Country</td>
|
|
<td><?= $card_to_country ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Origin Postal</td>
|
|
<td><input type="text" class="form-control" style="width:400px;" id="from_postal" name="from_postal" value="<?= $from_postal ?>"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Dest Postal</td>
|
|
<td><input type="text" class="form-control" style="width:400px;" id="to_postal" name="to_postal" value="<?= $to_postal ?>"></td>
|
|
</tr>
|
|
</table>
|
|
<input type="submit" value="Filter" />
|
|
</fieldset>
|
|
</form>
|
|
|
|
<div class="panel-heading">
|
|
<h6 class="panel-title">Quotes</h6>
|
|
<div class="heading-elements">
|
|
<a href="/bkoreport/quote">Recent</a>
|
|
| <a href="/bkoreport/quotes">Aggregate</a>
|
|
| <a href="/bkoreport/totalquotes">Total</a>
|
|
</div>
|
|
</div>
|
|
<div id="quotes" class="table-responsive">
|
|
<?= $links ?>
|
|
<?= $quotes_table ?>
|
|
</div>
|
|
</div>
|
|
<!-- /Recent Members -->
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
function viewQuotes(from, to) {
|
|
if (from > 0 && to > 0) {
|
|
document.location = '/bkoadmin/compare?from=' + from + '&to=' + to;
|
|
}
|
|
return false;
|
|
}
|
|
</script>
|
|
<!-- jQuery UI -->
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
|
<script type='text/javascript'>
|
|
$(document).ready(function() {
|
|
console.log('aaaa');
|
|
// Initialize
|
|
$("#autofrom").autocomplete({
|
|
source: function(request, response) {
|
|
console.log('bbbb');
|
|
// Fetch data
|
|
$.ajax({
|
|
url: "/bkoreport/addresssearch",
|
|
type: 'post',
|
|
dataType: "json",
|
|
data: {
|
|
search: request.term
|
|
},
|
|
success: function(data) {
|
|
response(data);
|
|
},
|
|
error: function(data) {
|
|
console.log(data);
|
|
}
|
|
});
|
|
},
|
|
select: function(event, ui) {
|
|
// Set selection
|
|
$('#autofrom').val(ui.item.label); // display the selected text
|
|
$('#from').val(ui.item.value); // save selected id to input
|
|
return false;
|
|
}
|
|
});
|
|
$("#autoto").autocomplete({
|
|
source: function(request, response) {
|
|
// Fetch data
|
|
$.ajax({
|
|
url: "/bkoreport/addresssearch",
|
|
type: 'post',
|
|
dataType: "json",
|
|
data: {
|
|
search: request.term
|
|
},
|
|
success: function(data) {
|
|
response(data);
|
|
}
|
|
});
|
|
},
|
|
select: function(event, ui) {
|
|
// Set selection
|
|
$('#autoto').val(ui.item.label); // display the selected text
|
|
$('#to').val(ui.item.value); // save selected id to input
|
|
return false;
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|