2023-10-09 16:34:20 +02:00
|
|
|
<section id="main-view" class="lg:min-h-ffh xl:min-h-ffhl flex items-top justify-center">
|
|
|
|
<section>
|
|
|
|
<div class="max-w-md w-full p-6 bg-white text-lg">
|
2023-10-10 16:52:50 +02:00
|
|
|
{% include "../parking-spaces/rent_space_info.html" %}
|
2023-10-09 16:34:20 +02:00
|
|
|
</div>
|
|
|
|
<div class="max-w-md w-full p-6 bg-white rounded-lg shadow-lg">
|
|
|
|
<form
|
|
|
|
{% if let Some(id) = form.id %}
|
2023-10-11 11:21:33 +02:00
|
|
|
hx-put='/parking-spaces/{{parking_space.id}}/parking-space-rents/update/{{id}}'
|
2023-10-09 16:34:20 +02:00
|
|
|
{% else %}
|
2023-10-11 11:21:33 +02:00
|
|
|
hx-post='/parking-spaces/{{parking_space.id}}/parking-space-rents/create'
|
2023-10-09 16:34:20 +02:00
|
|
|
{% endif %}
|
|
|
|
hx-headers="{'Accept':'text/html-partial'}"
|
2023-10-11 11:21:33 +02:00
|
|
|
>
|
2023-10-09 16:34:20 +02:00
|
|
|
{% if let Some(id) = form.id %}
|
|
|
|
<input type="hidden" value="{{id}}" name="id" />
|
|
|
|
{% endif %}
|
2023-09-27 18:17:27 +02:00
|
|
|
|
2023-10-09 16:34:20 +02:00
|
|
|
<input type="hidden" value="{{parking_space.id}}" name="parking_space_id" />
|
2023-09-27 18:17:27 +02:00
|
|
|
|
2023-10-09 16:34:20 +02:00
|
|
|
<div class="mb-4">
|
|
|
|
<label
|
|
|
|
for="price"
|
|
|
|
class="block mb-2 text-sm text-gray-600"
|
2023-10-11 11:21:33 +02:00
|
|
|
>
|
2023-10-09 16:34:20 +02:00
|
|
|
{{ "Price"|t(lang,t) }}
|
|
|
|
</label>
|
2023-10-10 17:05:40 +02:00
|
|
|
<div class="flex w-full">
|
2023-10-09 16:34:20 +02:00
|
|
|
<input
|
2023-10-11 11:21:33 +02:00
|
|
|
id="price"
|
|
|
|
name="price_f"
|
2023-10-10 17:05:40 +02:00
|
|
|
class="px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-cyan-500"
|
|
|
|
type="number"
|
2023-10-11 11:21:33 +02:00
|
|
|
step="0.01"
|
|
|
|
min="0.00"
|
|
|
|
max="1000000.00"
|
2023-10-10 17:05:40 +02:00
|
|
|
required
|
2023-10-11 11:21:33 +02:00
|
|
|
{% if let Some(v) = form.price %} value="{{ v|display_price }}" {% endif %}
|
2023-10-10 17:05:40 +02:00
|
|
|
/>
|
|
|
|
<span class="m-1">PLN</span>
|
|
|
|
</div>
|
2023-10-09 16:34:20 +02:00
|
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
|
|
<input
|
2023-10-11 11:21:33 +02:00
|
|
|
type="submit"
|
|
|
|
{% if let Some(id) = form.id %}
|
|
|
|
value="{{"Update parking space rent"|t(lang,t)}}"
|
|
|
|
{% else %}
|
|
|
|
value="{{"Register parking space rent"|t(lang,t)}}"
|
|
|
|
{% endif %}
|
|
|
|
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"
|
2023-10-09 16:34:20 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</section>
|
2023-09-27 18:17:27 +02:00
|
|
|
</section>
|