<%= form_with(model: entry, local: true) do |form| %> <% if entry.errors.any? %>

<%= pluralize(entry.errors.count, "Fehler") %> verhinderten das Speichern:

<% end %>
<%= form.label :date, 'Datum', class: 'form-label' %> <%= form.text_field :date, class: 'form-control flatpickr', data: { enable_time: false } , value: (form.object.date || Date.today)%>
<%= form.label :hours, 'Stunden', class: 'form-label' %> <%= form.number_field :hours, class: 'form-control', min: 0 , value: form.object.minutes || 2%>
<%= form.label :minutes, 'Minuten', class: 'form-label' %> <%= form.number_field :minutes, class: 'form-control', min: 0, max: 59, value: form.object.minutes || 0 %>
<%= form.label :praktikums_typ, 'Praktikumstyp', class: 'form-label' %> <%= form.select :praktikums_typ, Entry::PRAKTIKUMSTYPEN, {}, class: 'form-control' %>
<%= form.label :entry_art, 'Art', class: 'form-label' %> <%= form.select :entry_art, Entry::ENTRY_ARTEN, {}, class: 'form-control' %>
<%= form.label :distance_km, 'Entfernung (km) Gesamt', class: 'form-label' %> <%= form.number_field :distance_km, class: 'form-control', min: 0 %>
<%= form.submit 'Speichern', class: 'btn btn-primary' %>
<% end %>