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]: Read cancel button path from method

Kabiru Mwenja5a5a372689be
diff --git a/modules/storages/app/components/storages/admin/forms/general_info_form_component.rb b/modules/storages/app/components/storages/admin/forms/general_info_form_component.rb
index 7644214c9ad..c1c63751ee5 100644
--- a/modules/storages/app/components/storages/admin/forms/general_info_form_component.rb
+++ b/modules/storages/app/components/storages/admin/forms/general_info_form_component.rb
@@ -35,8 +35,7 @@ module Storages::Admin::Forms
options form_method: :post,
submit_button_disabled: false,
- cancel_button_should_break_from_frame: false,
- cancel_button_path: Rails.application.routes.url_helpers.admin_settings_storages_path
+ cancel_button_should_break_from_frame: false
def form_url
options[:form_url] || default_form_url
@@ -62,5 +61,9 @@ module Storages::Admin::Forms
Rails.application.routes.url_helpers.admin_settings_storage_path(storage)
end
end
+
+ def cancel_button_path
+ options[:cancel_button_path] || Rails.application.routes.url_helpers.admin_settings_storages_path
+ end
end
end