forked from fixin.me/fixin.me
Disable Turbo in User forms/links
This commit is contained in:
parent
afc4f5cee0
commit
5dd3303019
@ -51,7 +51,7 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def labelled_form_for(record, options = {}, &block)
|
def labelled_form_for(record, options = {}, &block)
|
||||||
options.merge! builder: LabelledFormBuilder
|
options = options.deep_merge builder: LabelledFormBuilder, data: {turbo: false}
|
||||||
form_for(record, **options) { |f| f.form_for(&block) }
|
form_for(record, **options) { |f| f.form_for(&block) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<%= image_link_to t(".revert"), "incognito-off", revert_users_path %>
|
<%= image_link_to t(".revert"), "incognito-off", revert_users_path %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_button_to t(".sign_out"), "logout", destroy_user_session_path,
|
<%= image_button_to t(".sign_out"), "logout", destroy_user_session_path,
|
||||||
method: :delete %>
|
method: :delete, data: {turbo: false} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_link_to_unless_current(t(:sign_in), "login", new_user_session_path) {} %>
|
<%= image_link_to_unless_current(t(:sign_in), "login", new_user_session_path) {} %>
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
|
|
||||||
<div class="rightside buttongrid">
|
<div class="rightside buttongrid">
|
||||||
<%= image_button_to t(".delete"), "account-remove-outline", user_registration_path,
|
<%= image_button_to t(".delete"), "account-remove-outline", user_registration_path,
|
||||||
method: :delete, form_class: 'tools', onclick: {confirm: t(".confirm_delete")} %>
|
form_class: 'tools', method: :delete, data: {turbo: false},
|
||||||
|
onclick: {confirm: t(".confirm_delete")} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= labelled_form_for resource, url: registration_path(resource),
|
<%= labelled_form_for resource, url: registration_path(resource),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user