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 registration spec using turbo

Oliver Güntherbbd4001e1d1c
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index d909312f0d8..ae8a53fd4e0 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -386,6 +386,7 @@ class AccountController < ApplicationController
# correct password
if not user.active?
account_inactive(user, flash_now: true)
+ render status: :unprocessable_entity
elsif user.force_password_change
return if redirect_if_password_change_not_allowed(user)
diff --git a/app/views/account/_register.html.erb b/app/views/account/_register.html.erb
index f76fc104dfa..554f8be6fa0 100644
--- a/app/views/account/_register.html.erb
+++ b/app/views/account/_register.html.erb
@@ -27,7 +27,11 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<div class="modal-delivery-element">
- <%= labelled_tabular_form_for(@user, url: account_register_path, html: { class: 'form -wide-labels spot-modal' }) do |f| %>
+ <%= labelled_tabular_form_for(
+ @user,
+ url: account_register_path,
+ data: { turbo: false },
+ html: { class: 'form -wide-labels spot-modal' }) do |f| %>
<%= back_url_hidden_field_tag use_referer: false %>
<%= error_messages_for :user %>
<div id="spotModalTitle" class="spot-modal--header">