<% content_for :title, "Ask someone to sign" %> <%= render "shared/aircraft_header", aircraft: @aircraft %> <%= form_with model: @invitation, url: aircraft_logbook_entry_signing_invitations_path(@aircraft, @entry), class: "card card-body max-w-2xl space-y-4" do |f| %>

Ask someone to sign

For a mechanic who did the work: they get a one-time link by email, sign in or create their own account, add their certificate, and sign this entry with their own password. They see only this entry.

<%= f.errors_summary %>
<%= @entry.date %> · <%= LogbookEntry::LOG_TYPES[@entry.log_type] %> log · <%= @entry.text.truncate(160) %>
<%= f.field :email, as: :email, label: "Their email", required: true %> <%= f.field :message, as: :textarea, rows: 2, label: "Message (optional)" %>
<%= f.submit "Send invitation" %><%= link_to "Cancel", aircraft_logbook_entry_path(@aircraft, @entry), class: "btn-secondary" %>
<% end %>