Disable Turbo for settings forms

This commit is contained in:
Andreas Nedbal 2022-09-04 14:54:28 +02:00 committed by Andreas Nedbal
parent dc91d91c2e
commit 8d1e32e0f3
6 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
.card
.card-body
= bootstrap_form_for(resource, as: resource_name, url: "/settings/account", html: { method: :put }) do |f|
= bootstrap_form_for(resource, as: resource_name, url: "/settings/account", html: { method: :put }, data: { turbo: false}) do |f|
= render "modal/password", f: f
= render "devise/shared/error_messages", resource: resource

View File

@ -11,7 +11,7 @@
.input-group-append
%button.btn.btn-danger{ type: "button", data: { id: rule.id } }= t(".actions.remove")
.form-group
%form
%form{ data: { turbo: false } }
.input-group
%input.form-control#new-rule-text{ placeholder: t(".placeholder") }
.input-group-append

View File

@ -1,6 +1,6 @@
.card
.card-body
= bootstrap_form_for(current_user, url: settings_privacy_path, method: :patch) do |f|
= bootstrap_form_for(current_user, url: settings_privacy_path, method: :patch, data: { turbo: false }) do |f|
= f.check_box :privacy_allow_anonymous_questions
= f.check_box :privacy_allow_public_timeline
= f.check_box :privacy_allow_stranger_answers

View File

@ -1,6 +1,6 @@
.card
.card-body
= bootstrap_form_for(current_user, url: settings_profile_picture_path, html: { multipart: true }, method: :patch) do |f|
= bootstrap_form_for(current_user, url: settings_profile_picture_path, html: { multipart: true }, method: :patch, data: { turbo: false }) do |f|
.media#profile-picture-media
.pull-left
@ -35,7 +35,7 @@
= f.primary
.card
.card-body
= bootstrap_form_for(current_user.profile, html: { multipart: true }, method: :patch) do |f|
= bootstrap_form_for(current_user.profile, html: { multipart: true }, method: :patch, data: { turbo: false }) do |f|
= f.text_field :display_name, autocomplete: :name

View File

@ -6,8 +6,8 @@
- if current_user.theme
.pull-right
= bootstrap_form_for(current_user.theme || Theme.new, html: { id: "update" }, method: :patch) do |f|
= link_to t(".delete"), settings_theme_path, data: { turbo_confirm: t("voc.confirm"), turbo_method: :delete }, tabindex: -1, class: "btn btn-danger"
= bootstrap_form_for(current_user.theme || Theme.new, html: { id: "update" }, method: :patch, data: { turbo: false }) do |f|
.card
.card-body
%h2= t(".general.heading")

View File

@ -8,7 +8,7 @@
= t(".setup_key")
%code= current_user.otp_secret_key.scan(/.{4}/).flatten.join(" ")
.totp-setup__content.col
= bootstrap_form_for(current_user, url: settings_two_factor_authentication_otp_authentication_path) do |f|
= bootstrap_form_for(current_user, url: settings_two_factor_authentication_otp_authentication_path, data: { turbo: false }) do |f|
%p= t(".app.none")
%ul.list-unstyled.pl-3
%li