<%= form_with model: [ :admin, template ], class: "card card-body max-w-3xl space-y-4" do |f| %> <%= f.errors_summary %>
<%= f.field :name, required: true, placeholder: t(".oil_and_filter_change") %> <%= f.field :reference, placeholder: t(".part_43_app_a_c"), hint: t(".shown_next_to_the_name") %>
<%= f.field :text, as: :textarea, rows: 5, required: true, hint: t(".the_entry_text_use_for") %>
<%= f.field :entry_type, as: :select, label: t(".entry_type"), collection: LogbookEntry::ENTRY_TYPES.invert %> <%= f.field :log_type, as: :select, label: t(".logbook"), include_blank: t(".leave_as_is"), collection: LogbookEntry::LOG_TYPES.invert %> <%= f.field :certificate_type, as: :select, label: t(".kind_of_certificate"), include_blank: t(".leave_as_is"), collection: LogbookEntry::CERTIFICATE_TYPES.invert, hint: t(".only_filled_in_when_none") %> <%= f.field :position, as: :number, label: t(".order") %>
<%= f.submit t(".save_template") %><%= link_to t(".cancel"), admin_logbook_templates_path, class: "btn-secondary" %>
<% end %> <% if template.persisted? %>
<%= delete_button t(".delete_template"), admin_logbook_template_path(template) %>
<% end %>