Move continue auth/start mapping button to appear fixed in footer

Pin 'Continue Auth/Start Mapping' button to bottom of page for improved user navigation and simplified OAuth process.
This commit is contained in:
Emin Kocan 2024-07-03 13:19:23 +02:00
parent eb0f95b6ae
commit 874f59ed54
2 changed files with 18 additions and 8 deletions

View file

@ -15,5 +15,12 @@
<%= yield %>
</div>
</div>
<% if content_for? :footer %>
<footer class="content-footer bg-body-secondary border-top border-secondary-subtle <%= yield :footer_outer_class %>">
<div class="content-inner <%= yield :footer_class %>">
<%= yield :footer %>
</div>
</footer>
<% end %>
<% end %>
</div>

View file

@ -77,17 +77,20 @@
<%= render "any_questions" %>
<div class='text-center mb-3'>
<% if params[:oauth_return_url] %>
<a class="btn btn-primary" href="<%= params[:oauth_return_url] %>"><%= t ".continue_authorization" %></a>
<% else %>
<a class="btn btn-primary start-mapping" href="<%= edit_path %>"><%= t ".start_mapping" %></a>
<% end %>
</div>
<div class='alert alert-primary'>
<h2><%= t ".add_a_note.title" %></h2>
<p><%= t ".add_a_note.para_1" %></p>
<p><%= t ".add_a_note.para_2_html", :map_link => link_to(t(".add_a_note.the_map"), root_path),
:note_icon => tag.span(:class => "icon note bg-dark rounded-1") %></p>
</div>
<% content_for :footer_outer_class, "sticky-bottom" %>
<% content_for :footer do %>
<div class='d-flex justify-content-center align-items-center'>
<% if params[:oauth_return_url] %>
<a class="btn btn-primary" href="<%= params[:oauth_return_url] %>"><%= t ".continue_authorization" %></a>
<% else %>
<a class="btn btn-primary start-mapping" href="<%= edit_path %>"><%= t ".start_mapping" %></a>
<% end %>
</div>
<% end %>