]> git.openstreetmap.org Git - rails.git/blob - app/views/preferences/edit.html.erb
Add site color scheme select to preferences form
[rails.git] / app / views / preferences / edit.html.erb
1 <% content_for :heading do %>
2   <h1><%= t ".title" %></h1>
3 <% end %>
4
5 <%= bootstrap_form_for current_user, :url => { :action => :update } do |f| %>
6   <%= f.select :preferred_editor, [[t("editor.default", :name => t("editor.#{Settings.default_editor}.name")), "default"]] + Editors::AVAILABLE_EDITORS.collect { |e| [t("editor.#{e}.description"), e] } %>
7
8   <%= f.text_field :languages %>
9
10   <div class="mb-3">
11     <%= label_tag "site_color_scheme", t("preferences.show.preferred_site_color_scheme"), :class => "form-label" %>
12     <%= select_tag "site_color_scheme",
13                    options_for_select(%w[auto light dark].map { |scheme| [t("preferences.show.site_color_schemes.#{scheme}"), scheme] },
14                                       preferred_site_color_scheme),
15                    :class => "form-select" %>
16   </div>
17
18   <%= f.primary t(".save") %>
19   <%= link_to t(".cancel"), preferences_path, :class => "btn btn-link" %>
20 <% end %>