From a5a7ee116cf8cc25e1115ef7aa7b8710f673882d Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 8 Aug 2023 20:25:48 +0300 Subject: [PATCH] Remove 'no home' message css from profile edit form --- app/assets/javascripts/user.js | 2 +- app/assets/stylesheets/common.scss | 14 -------------- app/views/profiles/edit.html.erb | 10 ++++------ 3 files changed, 5 insertions(+), 21 deletions(-) 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" /> -- 2.39.5