From: Anton Khorev Date: Tue, 8 Aug 2023 17:25:48 +0000 (+0300) Subject: Remove 'no home' message css from profile edit form X-Git-Tag: live~1105^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a5a7ee116cf8cc25e1115ef7aa7b8710f673882d Remove 'no home' message css from profile edit form --- diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 14da8f300..964f187f9 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -54,7 +54,7 @@ $(document).ready(function () { precision = OSM.zoomPrecision(zoom), location = e.latlng.wrap(); - $("#homerow").removeClass(); + $("#home_message").hide(); $("#home_lat").val(location.lat.toFixed(precision)); $("#home_lon").val(location.lng.toFixed(precision)); diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 0769ff283..301709fe1 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1123,20 +1123,6 @@ tr.turn:hover { } } -/* Rules for the account settings page */ - -.nohome .location { - display: none; -} - -#homerow .message { - display: none; -} - -.nohome .message { - display: inline !important; -} - /* Rules for the oauth authorization page */ .oauth-authorize ul { diff --git a/app/views/profiles/edit.html.erb b/app/views/profiles/edit.html.erb index 2af64b84f..5bf7426f2 100644 --- a/app/views/profiles/edit.html.erb +++ b/app/views/profiles/edit.html.erb @@ -42,12 +42,10 @@
<%= t ".home location" -%> -
class="nohome"<% end %>> -

<%= t ".no home location" %>

-
- <%= 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" %> -
+

hidden<% end %>><%= t ".no home location" %>

+
+ <%= 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" %>
checked="checked" <% end %> id="updatehome" />