Add search bar for stations
This commit is contained in:
parent
0309bb0a65
commit
751a1eecfd
@ -29,7 +29,14 @@
|
|||||||
<a class="nav-link" href="/about/">Über</a>
|
<a class="nav-link" href="/about/">Über</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -35,7 +35,11 @@
|
|||||||
<script src="/static/datatables-1.10.20/js/datatables.min.js"></script>
|
<script src="/static/datatables-1.10.20/js/datatables.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#tableid').DataTable();
|
$('#tableid').DataTable({
|
||||||
|
"search": {
|
||||||
|
"search": new URLSearchParams(window.location.search).get("q")
|
||||||
|
}
|
||||||
|
});
|
||||||
} );
|
} );
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user