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

fix[Op#50737]: Remove Cancel button from OAuthApplicationInfoCopy component

Kabiru Mwenja13c9df8f5819
diff --git a/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.html.erb b/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.html.erb
index 69adf695cb7..6cf35ab5e47 100644
--- a/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.html.erb
+++ b/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.html.erb
@@ -33,7 +33,6 @@
credentials_row.with_row do
concat(render(Primer::Beta::Button.new(**submit_button_options)) { I18n.t('storages.buttons.done_continue') })
- concat(render(Primer::Beta::Button.new(**cancel_button_options)) { I18n.t('button_cancel') })
end
end
end
diff --git a/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.rb b/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.rb
index 7833cab7b19..2bf6f2432b4 100644
--- a/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.rb
+++ b/modules/storages/app/components/storages/admin/oauth_application_info_copy_component.rb
@@ -35,8 +35,6 @@ module Storages::Admin
attr_reader :storage
alias_method :oauth_application, :model
- options cancel_button_should_break_from_frame: false
-
def initialize(oauth_application:, storage:, **options)
super(oauth_application, **options)
@storage = storage
@@ -60,22 +58,10 @@ module Storages::Admin
}.merge(options.fetch(:submit_button_options, {}))
end
- def cancel_button_options
- { scheme: :default,
- tag: :a,
- href: cancel_button_path }.tap do |options_hash|
- options_hash[:target] = '_top' if cancel_button_should_break_from_frame
- end
- end
-
private
def submit_button_path
options[:submit_button_path] || edit_admin_settings_storage_path(storage)
end
-
- def cancel_button_path
- options[:cancel_button_path] || edit_admin_settings_storage_path(storage)
- end
end
end
diff --git a/modules/storages/app/components/storages/admin/storage_view_component.html.erb b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
index f9b8d59c2a7..2219a21e074 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
@@ -32,8 +32,7 @@
Storages::Admin::OAuthApplicationInfoCopyComponent.new(
oauth_application:,
storage:,
- submit_button_path: show_oauth_application_admin_settings_storage_path(storage),
- cancel_button_path: admin_settings_storages_path
+ submit_button_path: show_oauth_application_admin_settings_storage_path(storage)
)
)
end
diff --git a/modules/storages/app/views/storages/admin/storages/create.turbo_stream.erb b/modules/storages/app/views/storages/admin/storages/create.turbo_stream.erb
index f15990f2c5d..155a9b7fd5c 100644
--- a/modules/storages/app/views/storages/admin/storages/create.turbo_stream.erb
+++ b/modules/storages/app/views/storages/admin/storages/create.turbo_stream.erb
@@ -42,9 +42,7 @@ See COPYRIGHT and LICENSE files for more details.
submit_button_options: {
data: { turbo_stream: true }
},
- submit_button_path: new_admin_settings_storage_oauth_client_path(@storage),
- cancel_button_path: admin_settings_storages_path,
- cancel_button_should_break_from_frame: true
+ submit_button_path: new_admin_settings_storage_oauth_client_path(@storage)
)
)
%>
diff --git a/modules/storages/app/views/storages/admin/storages/show_oauth_application.turbo_stream.erb b/modules/storages/app/views/storages/admin/storages/show_oauth_application.turbo_stream.erb
index 9bc710790bb..95531304160 100644
--- a/modules/storages/app/views/storages/admin/storages/show_oauth_application.turbo_stream.erb
+++ b/modules/storages/app/views/storages/admin/storages/show_oauth_application.turbo_stream.erb
@@ -40,9 +40,7 @@ See COPYRIGHT and LICENSE files for more details.
submit_button_options: {
data: { turbo_stream: true }
},
- submit_button_path: new_admin_settings_storage_oauth_client_path(@storage),
- cancel_button_path: admin_settings_storages_path,
- cancel_button_should_break_from_frame: true
+ submit_button_path: new_admin_settings_storage_oauth_client_path(@storage)
)
)
%>