]> git.openstreetmap.org Git - rails.git/commitdiff
Remove 'no home' message css from profile edit form
authorAnton Khorev <tony29@yandex.ru>
Tue, 8 Aug 2023 17:25:48 +0000 (20:25 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 8 Aug 2023 17:26:15 +0000 (20:26 +0300)
app/assets/javascripts/user.js
app/assets/stylesheets/common.scss
app/views/profiles/edit.html.erb

index 14da8f300497cc8fd0497616a0ef1d21923b95ae..964f187f9795d7861ffc7ceb6b0c8f3514234e5b 100644 (file)
@@ -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));
 
index 0769ff2834f0ae678d43287aa94cbad15ae00ef8..301709fe109a0754065acf9ab8321efe79d7d686 100644 (file)
@@ -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 {
index 2af64b84fae10f462db46b194ea0ac7652c3c83d..5bf7426f2946c74a1ecc3a770b5a4363954eb13f 100644 (file)
 
   <fieldset>
     <legend><%= t ".home location" -%></legend>
-    <div id="homerow" <% unless current_user.home_lat and current_user.home_lon %> class="nohome"<% end %>>
-      <p class="message text-muted"><%= t ".no home location" %></p>
-      <div class="row">
-        <%= 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>
+    <p id="home_message" class="text-muted"<% if current_user.home_lat and current_user.home_lon %> hidden<% end %>><%= t ".no home location" %></p>
+    <div class="row">
+      <%= 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>
     <div class="form-check">
       <input class="form-check-input" type="checkbox" name="updatehome" value="1" <% unless current_user.home_lat and current_user.home_lon %> checked="checked" <% end %> id="updatehome" />