[openstreetmap/openstreetmap-website] Separate forms for preferences and profile (#3257)
Andy Allan
notifications at github.com
Wed Jul 21 10:01:37 UTC 2021
@gravitystorm commented on this pull request.
> @@ -0,0 +1,12 @@
+<% content_for :heading do %>
+ <h1><%= t ".title" %></h1>
+<% end %>
+
+<%= 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] } %>
+
+ <%= f.text_field :languages %>
+
+ <%= f.primary t(".save") %>
+ <%= link_to t(".cancel"), preferences_path, :class => "btn btn-link" %>
I'm happy with the cancel link being just a link, since it reinforces the idea that it's not going to change any state on the server.
We also use this pattern elsewhere already (traces, user blocks and messages) so I'd prefer to keep it consistent here, and if we do decide to change it, do so everywhere in a separate PR.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3257#discussion_r673836322
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210721/82c8348f/attachment.htm>
More information about the rails-dev
mailing list