]> git.openstreetmap.org Git - rails.git/commitdiff
Add map color scheme select to preferences form
authorAnton Khorev <tony29@yandex.ru>
Sun, 1 Dec 2024 01:02:51 +0000 (04:02 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sun, 1 Dec 2024 01:58:00 +0000 (04:58 +0300)
app/views/preferences/edit.html.erb

index 2c3cd4ba0d961711e81002489a9b478a7163e41f..aaf07e927e27a11b9d0a599a9ce2d4887563307d 100644 (file)
                    :class => "form-select" %>
   </div>
 
+  <div class="mb-3">
+    <%= label_tag "map_color_scheme", t("preferences.show.preferred_map_color_scheme"), :class => "form-label" %>
+    <%= select_tag "map_color_scheme",
+                   options_for_select(%w[auto light dark].map { |scheme| [t("preferences.show.map_color_schemes.#{scheme}"), scheme] },
+                                      preferred_color_scheme(:map)),
+                   :class => "form-select" %>
+  </div>
+
   <%= f.primary t(".save") %>
   <%= link_to t(".cancel"), preferences_path, :class => "btn btn-link" %>
 <% end %>