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

make form control look like a form control

Bruno Pagno4aa5d23d6dbf
diff --git a/app/components/work_packages/types/pattern_input.html.erb b/app/components/work_packages/types/pattern_input.html.erb
index 83e160305e0..281602778d8 100644
--- a/app/components/work_packages/types/pattern_input.html.erb
+++ b/app/components/work_packages/types/pattern_input.html.erb
@@ -29,8 +29,8 @@ See COPYRIGHT and LICENSE files for more details.
<%=
render(
- Primer::BaseComponent.new(
- tag: :div,
+ FormControl.new(
+ input: @input,
classes: "pattern-input",
"data-controller": "pattern-input",
"data-pattern-input-pattern-initial-value": @value,
@@ -47,7 +47,7 @@ See COPYRIGHT and LICENSE files for more details.
<template data-pattern-input-target="suggestionsHeadingTemplate">
<%= render(Primer::Alpha::ActionList::Heading.new(title: "__placeholder__", heading_level: 2)) %>
</template>
-
+
<template data-pattern-input-target="suggestionsDividerTemplate">
<%= render(Primer::Alpha::ActionList::Divider.new) %>
</template>
diff --git a/lib/primer/open_project/forms/dsl/pattern_input.rb b/lib/primer/open_project/forms/dsl/pattern_input.rb
index fb654d663f7..31388419be1 100644
--- a/lib/primer/open_project/forms/dsl/pattern_input.rb
+++ b/lib/primer/open_project/forms/dsl/pattern_input.rb
@@ -33,10 +33,11 @@ module Primer
module Forms
module Dsl
class PatternInput < Primer::Forms::Dsl::Input
- attr_reader :name, :value, :suggestions
+ attr_reader :name, :label, :value, :suggestions
- def initialize(name:, value:, suggestions:, **system_arguments)
+ def initialize(name:, label:, value:, suggestions:, **system_arguments)
@name = name
+ @label = label
@value = value
@suggestions = suggestions