Various improvements

This commit is contained in:
Edward Betts 2026-03-30 20:55:15 +01:00
parent a8e0bd39e5
commit 2090268754
3 changed files with 13 additions and 12 deletions

View file

@ -2,7 +2,7 @@
{% block content %}
<div class="card">
<h2 style="margin-top:0">Plan your journey</h2>
<form id="journey-form">
<form method="get" action="{{ url_for('search') }}">
<div style="margin-bottom:1.2rem">
<label for="destination" style="display:block;font-weight:600;margin-bottom:0.4rem">
Eurostar destination
@ -32,12 +32,4 @@
</button>
</form>
</div>
<script>
document.getElementById('journey-form').addEventListener('submit', function(e) {
e.preventDefault();
const slug = this.querySelector('[name="destination"]').value;
const date = this.querySelector('[name="travel_date"]').value;
if (slug && date) window.location.href = '/results/' + slug + '/' + date;
});
</script>
{% endblock %}