63 lines
1.8 KiB
HTML
63 lines
1.8 KiB
HTML
<section id="main-view" class="min-h-screen flex items-center justify-center">
|
|
<section class="max-w-md w-full p-6 bg-white rounded-lg shadow-lg">
|
|
<h2 class="text-xl text-gray-900 mb-2">{{ "Register parking space"|t(lang,t) }}</h2>
|
|
{% for error in errors.global() %}
|
|
<oswilno-error>{{error|t(lang,t)}}</oswilno-error>
|
|
{% endfor %}
|
|
<form hx-post="/parking-spaces/create" hx-target="main">
|
|
{% match form.id %}
|
|
{% when Some with (id) %}
|
|
<input type="hidden" name="id" value="{{id}}" />
|
|
{% when _ %}
|
|
{% endmatch %}
|
|
<div class="mb-4">
|
|
<label
|
|
for="location_id"
|
|
class="block mb-2 text-sm text-gray-600"
|
|
>
|
|
{{ "Location"|t(lang,t) }}
|
|
</label>
|
|
<select
|
|
id="location_id"
|
|
name="location_id"
|
|
value="{{ form.location_id|skip_if(0) }}"
|
|
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500"
|
|
>
|
|
{% for loc in locations %}
|
|
<option value="{{loc.id}}">
|
|
{{ loc.name }}
|
|
{{ loc.number }}
|
|
Etap {{ loc.stage }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% for error in errors.field("login") %}
|
|
<oswilno-error>{{error|t(lang,t)}}</oswilno-error>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="mb-4">
|
|
<label
|
|
for="spot"
|
|
class="block mb-2 text-sm text-gray-600"
|
|
>
|
|
{{ "Spot"|t(lang,t) }}
|
|
</label>
|
|
<input
|
|
id="spot"
|
|
name="spot"
|
|
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500"
|
|
type="number"
|
|
required
|
|
/>
|
|
</div>
|
|
<div class="mb-6">
|
|
<input
|
|
type="submit"
|
|
value="{{"Register parking space"|t(lang,t)}}"
|
|
class="w-64 bg-cyan-600 text-white py-2 rounded-lg mx-auto block focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 mb-2"
|
|
/>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</section>
|