Disable show home location button if close enough to map center

This commit is contained in:
Anton Khorev 2023-08-10 03:02:02 +03:00
parent 2dbe4e6f88
commit 2a32a0427b
2 changed files with 13 additions and 1 deletions

View file

@ -47,7 +47,7 @@
<%= f.text_field :home_lat, :wrapper_class => "col-sm-4", :id => "home_lat" %>
<%= f.text_field :home_lon, :wrapper_class => "col-sm-4", :id => "home_lon" %>
<div class="col-sm-4 pt-2 align-self-end">
<button type="button" id="home_show" class="btn btn-outline-primary"<% unless current_user.has_home? %> hidden<% end %>><%= t ".show" %></button>
<button type="button" id="home_show" class="btn btn-outline-primary"<% unless current_user.has_home? %> hidden<% end %> disabled><%= t ".show" %></button>
<button type="button" id="home_delete" class="btn btn-outline-primary"<% unless current_user.has_home? %> hidden<% end %>><%= t ".delete" %></button>
<button type="button" id="home_undelete" class="btn btn-outline-primary" hidden><%= t ".undelete" %></button>
</div>