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

Show banner in metadata

Oliver Günther8d5754a9c7a3
diff --git a/modules/auth_saml/app/components/saml/providers/sections/metadata_form_component.html.erb b/modules/auth_saml/app/components/saml/providers/sections/metadata_form_component.html.erb
index d648e641bf3..0e6ef653deb 100644
--- a/modules/auth_saml/app/components/saml/providers/sections/metadata_form_component.html.erb
+++ b/modules/auth_saml/app/components/saml/providers/sections/metadata_form_component.html.erb
@@ -9,9 +9,17 @@
method: :post,
) do |form|
flex_layout do |flex|
- flex.with_row do
- render(Primer::Beta::Text.new(tag: :p, mb: 4, font_size: :small)) do
- t("saml.providers.section_texts.metadata_form")
+ if edit_mode
+ flex.with_row do
+ render(Primer::Beta::Text.new(tag: :p, mb: 4, font_size: :small)) do
+ t("saml.providers.section_texts.metadata_form")
+ end
+ end
+ else
+ flex.with_row do
+ render(Primer::Alpha::Banner.new(mb: 2, scheme: :warning, icon: :alert)) do
+ t("saml.providers.section_texts.metadata_form_banner")
+ end
end
end