<%= form_with model: aircraft, class: "card card-body space-y-4 max-w-3xl" do |f| %> <%= f.errors_summary %>
<%= f.field :tail_number, required: true, autofocus: true %> <%= f.field :make %> <%= f.field :model %> <%= f.field :serial_number %> <%= f.field :purchased, as: :date %> <%= f.field :status, as: :select, collection: Aircraft::STATUSES.invert %> <%= f.field :icao_type, label: t(".icao_type"), placeholder: "C150", maxlength: 4, hint: t(".type_designator_used_for_airtrail") %>
<%= f.field :description, as: :textarea, rows: 3 %>
<% if aircraft.new_record? %> <%= f.field :tach_time, as: :number, step: 0.1, label: t(".current_tach") %> <%= f.field :hobbs_time, as: :number, step: 0.1, label: t(".current_hobbs") %> <% end %> <%= f.field :tach_time_offset, as: :number, step: 0.1, hint: t(".subtracted_from_tach_for_maintenance") %> <%= f.field :hobbs_time_offset, as: :number, step: 0.1, hint: t(".the_same_for_hobbs") %>
<%= f.field :time_basis, as: :select, label: t(".maintenance_clock"), collection: Aircraft::TIME_BASES.invert, hint: t(".the_clock_used_as_time") %> <% unless aircraft.new_record? %>

<%= t(".to_change_hours_use_update") %>

<% end %> <%= f.field :picture, as: :file, accept: "image/*" %> <%= f.field :electronic_records_since, as: :date, label: t(".electronic_records_since"), wrapper: { class: "max-w-xs" }, hint: t(".the_date_this_app_became") %> <%= f.field :airworthiness_enforcement, as: :checkbox, label: t(".enforce_airworthiness"), hint: t(".block_flight_logs_and_hours") %>
<%= f.submit aircraft.new_record? ? t(".add_aircraft") : t(".save") %> <%= link_to t(".cancel"), aircraft.new_record? ? root_path : aircraft_path(aircraft), class: "btn-secondary" %>
<% end %>