Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

610 B
Raw Blame
<%
  the_form = Class.new(ApplicationForm) do
    form do |f|
      f.project_autocompleter(
        name: :id,
        label: Project.model_name.human,
        visually_hide_label: true,
        autocomplete_options: {
          openDirectly: false,
          focusDirectly: false,
          dropdownPosition: "bottom",
          disabledProjects: Project.visible.take(10).pluck(:id).index_with { |_id| "Disabled reason!" }
        }
      )
    end
  end

  model = Project.new
%>

<%= primer_form_with(
      model:,
      url: "/abc",
      id: "asdf"
    ) do |f|
      render(the_form.new(f))
    end %>