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

feat[Op#50737]: Extend clipboard copy component to allow input group options

Kabiru Mwenjac97191540e22
diff --git a/app/components/open_project/common/clipboard_copy_component.rb b/app/components/open_project/common/clipboard_copy_component.rb
index c00b7518333..c186345acf9 100644
--- a/app/components/open_project/common/clipboard_copy_component.rb
+++ b/app/components/open_project/common/clipboard_copy_component.rb
@@ -34,7 +34,8 @@ module OpenProject::Common
options visually_hide_label: true,
readonly: true,
- required: false
+ required: false,
+ input_group_options: {}
def text_field_options
{ name: options[:name],
@@ -44,13 +45,13 @@ module OpenProject::Common
value: value_to_copy,
inset: true,
readonly:,
- required: }
+ required: }.merge(input_group_options)
end
def clipboard_copy_options
{ value: value_to_copy,
aria: { label: clipboard_copy_aria_label },
- classes: clipboard_copy_classes }
+ classes: clipboard_copy_classes }.merge(input_group_options)
end
private