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

Allow adding custom modal component via strategy

Klaus Zanders5f46802e69d1
diff --git a/app/components/shares/modal_body_component.html.erb b/app/components/shares/modal_body_component.html.erb
index 83b42696b14..e0c2457ebce 100644
--- a/app/components/shares/modal_body_component.html.erb
+++ b/app/components/shares/modal_body_component.html.erb
@@ -1,6 +1,10 @@
<%=
component_wrapper(tag: 'turbo-frame') do
flex_layout(data: { turbo: true }) do |modal_content|
+ if strategy.custom_body_component?
+ render(strategy.additional_body_component.new(strategy: strategy, modal_body_container: modal_content))
+ end
+
modal_content.with_row do
render(Shares::InviteUserFormComponent.new(strategy:, errors: errors))
end