<% content_for :title, t(".log_flight") %> <%= render "shared/aircraft_header", aircraft: @aircraft %> <%= form_with model: [@aircraft, @flight_log], class: "card card-body space-y-5 max-w-3xl", data: { controller: "offline-flight", offline_flight_tail_value: @aircraft.tail_number, action: "submit->offline-flight#submit turbo:submit-start->offline-flight#remember turbo:fetch-request-error->offline-flight#networkFailed turbo:before-fetch-response->offline-flight#gatewayFailed" } do |f| %> <%= f.hidden_field :client_key, data: { offline_flight_target: "key" } %> <%= f.errors_summary %>
<%= f.field :date, as: :date, required: true %> <%= render "shared/airport_field", f: f, attribute: :departure_location, label: t(".from"), aircraft: @aircraft, placeholder: t(".koqu") %> <%= render "shared/airport_field", f: f, attribute: :destination_location, label: t(".to"), aircraft: @aircraft, placeholder: t(".code_or_name") %>
<%= t(".tach_required") %> <%= f.field :tach_out, as: :number, step: 0.1, label: t(".tach_out") %> <%= f.field :tach_in, as: :number, step: 0.1, label: t(".tach_in") %> <%= f.field :tach_time, as: :number, step: 0.1, label: t(".or_duration"), hint: t(".calculated_from_out_in_if") %>
<%= t(".hobbs_optional") %> <%= f.field :hobbs_out, as: :number, step: 0.1, label: t(".hobbs_out") %> <%= f.field :hobbs_in, as: :number, step: 0.1, label: t(".hobbs_in") %> <%= f.field :hobbs_time, as: :number, step: 0.1, label: t(".or_duration") %>
<%= t(".oil_fuel_added") %> <%= f.field :oil_added, as: :number, step: 0.25, label: t(".oil_added_qt") %> <%= f.field :oil_level_after, as: :number, step: 0.25, label: t(".oil_level_after_qt") %> <%= f.field :oil_added_type, label: t(".oil_type"), placeholder: t(".aeroshell_w100") %> <%= f.field :fuel_added, as: :number, step: 0.1, label: t(".fuel_added_gal") %> <%= f.field :fuel_level_after, as: :number, step: 0.1, label: t(".fuel_level_after_gal") %> <%= f.field :fuel_added_type, label: t(".fuel_type"), placeholder: t(".n100ll") %>
<%= f.field :route, as: :textarea, rows: 2 %> <%= f.field :notes, as: :textarea, rows: 2 %>
<%= f.field :track_log, as: :file, label: t(".track_log_gpx_kml_csv") %> <%= f.field :engine_data, as: :file, label: t(".engine_monitor_data"), hint: t(".cgr_30p_cgr_30c_flight"), accept: ".csv,text/csv" %>

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

<%= f.submit t(".log_flight") %><%= link_to t(".cancel"), aircraft_flight_logs_path(@aircraft), class: "btn-secondary" %>
<% end %>