Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.2 KB
Raw Blame
<%# "Datei anhaengen": a hidden multi file input that auto-submits a PATCH
    to tickets#update - ticket_document_files is already permitted there,
    Actors::SaveTicket creates the documents, and the update.turbo_stream
    re-render shows the new file. Sits in the ACTIONS line under the
    description, next to "Einklappen" (user correction 05.09.2026).
    Locals: ticket, project, current_organisation, sh %>
<%= form_with model: [current_organisation, project, ticket],
              method: :patch,
              class: "inline-flex",
              data: { controller: "auto-submit" } do |f| %>
  <%# sr-only, NOT hidden: Safari ignores label activation on a
      display:none file input (same fix as the composer's "Datei"). %>
  <label class="cursor-pointer text-cream-600 hover:text-cream-900 transition-colors">
    <%= t("#{sh}.attach_file") %>
    <%# include_hidden: false - Rails' auxiliary hidden input landed
        INSIDE the label before the file input, and Safari lets the
        label activation die on it. The create path needs no
        empty-array marker. %>
    <%= f.file_field :ticket_document_files, multiple: true, direct_upload: true, include_hidden: false, class: "sr-only" %>
  </label>
<% end %>