]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4145'
authorTom Hughes <tom@compton.nu>
Tue, 8 Aug 2023 17:37:00 +0000 (18:37 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 8 Aug 2023 17:37:00 +0000 (18:37 +0100)
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 f4a9ce4bca3a22201a70ce9182002efb70abd355..efd0ac265049fdbe4f77ebe5793ba020e112f781 100644 (file)
@@ -1123,32 +1123,6 @@ tr.turn:hover {
   }
 }
 
-/* Rules for the account settings page */
-
-#accountForm .user_image {
-  margin-bottom: 0;
-}
-
-#accountForm #user_image {
-  margin-left: 20px;
-}
-
-#accountForm ul.accountImage-options {
-  margin-left: 120px;
-}
-
-.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" />