X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/326d4ecec0ca0817567912f5d45b904df4c5b054..0ab8d954ad6d6e4cee5c1238973b8f693c788fcb:/app/views/preferences/show.html.erb diff --git a/app/views/preferences/show.html.erb b/app/views/preferences/show.html.erb index 9bf83cbf1..f23afda00 100644 --- a/app/views/preferences/show.html.erb +++ b/app/views/preferences/show.html.erb @@ -2,36 +2,26 @@

<%= t ".title" %>

<% end %> -
-
<%= t ".preferred_editor" %>
+<%= bootstrap_form_for current_user, :url => { :action => :update } do |f| %> + <%= 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] } %> - <% if current_user.preferred_editor? %> -
<%= t("editor.#{current_user.preferred_editor}.description") %>
- <% else %> -
<%= t("editor.default", :name => t("editor.#{Settings.default_editor}.name")) %>
- <% end %> + <%= f.text_field :languages %> -
<%= t ".preferred_languages" %>
+
+ <%= label_tag "site_color_scheme", t(".preferred_site_color_scheme"), :class => "form-label" %> + <%= select_tag "site_color_scheme", + options_for_select(%w[auto light dark].map { |scheme| [t(".site_color_schemes.#{scheme}"), scheme] }, + preferred_color_scheme(:site)), + :class => "form-select" %> +
-
- -
+
+ <%= label_tag "map_color_scheme", t(".preferred_map_color_scheme"), :class => "form-label" %> + <%= select_tag "map_color_scheme", + options_for_select(%w[auto light dark].map { |scheme| [t(".map_color_schemes.#{scheme}"), scheme] }, + preferred_color_scheme(:map)), + :class => "form-select" %> +
-
<%= t ".preferred_site_color_scheme" %>
-
- <%= t ".site_color_schemes.#{preferred_color_scheme(:site)}" %> -
- -
<%= t ".preferred_map_color_scheme" %>
-
- <%= t ".map_color_schemes.#{preferred_color_scheme(:map)}" %> -
-
- -
- <%= link_to t(".edit_preferences"), edit_preferences_path, :class => "btn btn-outline-primary" %> -
+ <%= f.primary t(".save") %> +<% end %>