Add search bar for stations

This commit is contained in:
clerie 2020-04-07 14:04:08 +02:00
parent 0309bb0a65
commit 751a1eecfd
2 changed files with 13 additions and 2 deletions

View File

@ -29,7 +29,14 @@
<a class="nav-link" href="/about/">Über</a>
</li>
</ul>
<!--<a href="#" class="btn btn-primary"></a>-->
<form class="form-inline" action="/station/">
<div class="input-group">
<input type="search" name="q" class="form-control" placeholder="Station">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="submit">Suchen</button>
</div>
</div>
</form>
</div>
</div>
</nav>

View File

@ -35,7 +35,11 @@
<script src="/static/datatables-1.10.20/js/datatables.min.js"></script>
<script>
$(document).ready(function() {
$('#tableid').DataTable();
$('#tableid').DataTable({
"search": {
"search": new URLSearchParams(window.location.search).get("q")
}
});
} );
</script>
{% endblock %}