Skip to content

Commit

Permalink
Disable Turbo on the leave overlay
Browse files Browse the repository at this point in the history
If someone leaves the alchemy admin
either via logout or visiting the frontend,
we must not use Turbo in order the reload
the assets.

(cherry picked from commit 277641c)
  • Loading branch information
tvdeyen committed Sep 29, 2023
1 parent d1b6584 commit 0cecb3b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/views/alchemy/admin/leave.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<%= render_message do %>
<%= Alchemy.t("You are about to leave Alchemy") %>
<% end %>
<p class="buttons">
<label><%= Alchemy.t("Do you want to") %></label>
<%= link_to Alchemy.t('stay logged in'), alchemy.root_path, class: 'button secondary' %>
</p>
<%= form_tag Alchemy.logout_path, method: Alchemy.logout_method, class: 'buttons' do %>
<label><%= Alchemy.t('or to completely') %></label>
<%= button_tag Alchemy.t(:logout), autofocus: true %>
<% end %>
<div data-turbo="false">
<p class="buttons">
<label><%= Alchemy.t("Do you want to") %></label>
<%= link_to Alchemy.t('stay logged in'), alchemy.root_path, class: 'button secondary' %>
</p>
<%= form_tag Alchemy.logout_path, method: Alchemy.logout_method, class: 'buttons' do %>
<label><%= Alchemy.t('or to completely') %></label>
<%= button_tag Alchemy.t(:logout), autofocus: true %>
<% end %>
</div>

0 comments on commit 0cecb3b

Please sign in to comment.