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

[#51372] add condition for copy-to-clipboard button

Eric Schubert1493f3333946
diff --git a/modules/storages/app/components/storages/admin/redirect_uri_component.html.erb b/modules/storages/app/components/storages/admin/redirect_uri_component.html.erb
index a3e2c2169ec..75fb18cc722 100644
--- a/modules/storages/app/components/storages/admin/redirect_uri_component.html.erb
+++ b/modules/storages/app/components/storages/admin/redirect_uri_component.html.erb
@@ -11,8 +11,10 @@
grid.with_area(:description, tag: :div, color: :subtle, test_selector: 'storage-redirect-uri-description') do
concat(render(Primer::Beta::Text.new) { provider_redirect_uri_description })
- concat(render(Primer::Beta::ClipboardCopy.new('aria-label': I18n.t('storages.instructions.one_drive.copy_redirect_uri'),
- value: storage.oauth_client.redirect_uri)))
+ if storage.oauth_client.present?
+ concat(render(Primer::Beta::ClipboardCopy.new('aria-label': I18n.t('storages.instructions.one_drive.copy_redirect_uri'),
+ value: storage.oauth_client.redirect_uri)))
+ end
end
if editable_storage?