Files
vms/app/views/vehicles/_form.html.erb
David Böhm 132ea2c51d
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Added vehicle scaffold
2024-08-20 19:50:29 +02:00

40 lines
1.7 KiB
Plaintext

<%= form_with(model: vehicle, class: "contents") do |form| %>
<% if vehicle.errors.any? %>
<div id="error_explanation" class="px-3 py-2 mt-3 font-medium text-red-500 rounded-lg bg-red-50">
<h2><%= pluralize(vehicle.errors.count, "error") %> prohibited this vehicle from being saved:</h2>
<ul>
<% vehicle.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="my-5">
<%= form.label :license_plate %>
<%= form.text_field :license_plate, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :vehicle_type %>
<%= form.text_field :vehicle_type, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :model_year %>
<%= form.text_field :model_year, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :car_brand %>
<%= form.text_field :car_brand, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :model %>
<%= form.text_field :model, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :fuel_type %>
<%= form.text_field :fuel_type, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="inline">
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
</div>
<% end %>