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

Cancel with turbo stream

Oliver Günther666f922e5c77
diff --git a/modules/auth_saml/app/controllers/saml/providers_controller.rb b/modules/auth_saml/app/controllers/saml/providers_controller.rb
index ecb05e69c1c..e9c225f09f5 100644
--- a/modules/auth_saml/app/controllers/saml/providers_controller.rb
+++ b/modules/auth_saml/app/controllers/saml/providers_controller.rb
@@ -24,13 +24,23 @@ module Saml
edit_state: @edit_state)
update_via_turbo_stream(component:)
scroll_into_view_via_turbo_stream("saml-providers-edit-form", behavior: :instant)
- render turbo_stream: turbo_streams, status:
+ render turbo_stream: turbo_streams
end
format.html
end
end
- def show; end
+ def show
+ respond_to do |format|
+ format.turbo_stream do
+ component = Saml::Providers::ViewComponent.new(@provider,
+ view_mode: :show)
+ update_via_turbo_stream(component:)
+ render turbo_stream: turbo_streams
+ end
+ format.html
+ end
+ end
def new
@provider = ::Saml::Provider.new
diff --git a/modules/auth_saml/app/forms/saml/providers/submit_or_cancel_form.rb b/modules/auth_saml/app/forms/saml/providers/submit_or_cancel_form.rb
index 0dc350c9193..d09139de777 100644
--- a/modules/auth_saml/app/forms/saml/providers/submit_or_cancel_form.rb
+++ b/modules/auth_saml/app/forms/saml/providers/submit_or_cancel_form.rb
@@ -69,6 +69,7 @@ module Saml
scheme: :default,
tag: :a,
href: back_link,
+ data: { turbo: true, turbo_stream: [email protected]_record? },
label: I18n.t("button_cancel")
}
end