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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
chore[#50212]: Add flash warning for credentials copy
Kabiru Mwenjab138b2104e46
diff --git a/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.html.erb b/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.html.erbindex 3a53808c909..7718d661a49 100644--- a/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.html.erb+++ b/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.html.erb@@ -1,6 +1,12 @@<%=- flex_layout(flex_items: :center) do |general_info_row|- general_info_row.with_row(mb: 3) do+ flex_layout(flex_items: :center) do |credentials_row|+ credentials_row.with_row(mb: 3) do+ render(Primer::Beta::Flash.new(icon: :alert, scheme: :warning)) do+ I18n.t('storages.instructions.oauth_application_details', oauth_application_details_link: oauth_application_details_link).html_safe+ end+ end++ credentials_row.with_row(mb: 3) dorender(OpenProject::Common::ClipboardCopyComponent.new(name: :openproject_oauth_application_uid,@@ -11,7 +17,7 @@)end- general_info_row.with_row(mb: 3) do+ credentials_row.with_row(mb: 3) dorender(OpenProject::Common::ClipboardCopyComponent.new(name: :openproject_oauth_application_secret,@@ -22,7 +28,7 @@)end- general_info_row.with_row do+ credentials_row.with_row do# TODO: Check with product if "Done, Continue" button is context awareconcat(render(Primer::Beta::Button.new(scheme: :primary, tag: :a, href: edit_admin_settings_storage_path(storage))) { I18n.t('storages.buttons.done_continue') })concat(render(Primer::Beta::Button.new(scheme: :default, tag: :a, href: edit_admin_settings_storage_path(storage))) { I18n.t('button_cancel') })diff --git a/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.rb b/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.rbindex 071cc40524d..8f5a9a93293 100644--- a/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.rb+++ b/modules/storages/app/components/storages/admin/oauth_application_credentials_copy_component.rb@@ -39,5 +39,15 @@ module Storages::Adminsuper(oauth_application, **options)@storage = storageend++ def oauth_application_details_link+ render(+ Primer::Beta::Link.new(+ href: Storages::Peripherals::StorageInteraction::Nextcloud::Util.join_uri_path(storage.host,+ 'settings/admin/openproject'),+ target: '_blank'+ )+ ) { I18n.t('storages.instructions.oauth_application_details_link_text') }+ endendenddiff --git a/modules/storages/app/components/storages/admin/storage_view_component.html.erb b/modules/storages/app/components/storages/admin/storage_view_component.html.erbindex eb610881f6d..ce14606332b 100644--- a/modules/storages/app/components/storages/admin/storage_view_component.html.erb+++ b/modules/storages/app/components/storages/admin/storage_view_component.html.erb@@ -28,7 +28,7 @@scheme: :invisible,href: edit_host_admin_settings_storage_path(storage),aria: { label: I18n.t('storages.label_edit_storage') } ,- data: { 'test-selector': 'storage-edit-button' }+ test_selector: 'storage-edit-button'))enddiff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex 2d1b83c222f..140f7308781 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -124,6 +124,8 @@ en:setting_up_storages: "For setting up file storages, please visit"setting_up_storages_non_admin: "Administrators can set up file storages in Administration / File Storages."all_available_storages_already_added: "All available storages are already added to the project."+ oauth_application_details: "The client secret value will not be accessible again after you close this window. Please copy these values into the %{oauth_application_details_link}."+ oauth_application_details_link_text: "Nextcloud OpenProject Integration settings"copy_from: "Copy this value from"nextcloud:integration: "Nextcloud Administration / OpenProject"