X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d9d515bf18e85f02c0d11571e298586a90003d77..bd8713f42b4a5196cf89e8270c57322742ba1f5e:/app/views/user/account.html.erb diff --git a/app/views/user/account.html.erb b/app/views/user/account.html.erb index 80c8c0e49..179e1b2f6 100644 --- a/app/views/user/account.html.erb +++ b/app/views/user/account.html.erb @@ -84,27 +84,37 @@ <%= t 'user.account.image' %> - - <% if @user.image.file? %> - - - - - - - - - - - - - - -
<%= user_image @user %><%= radio_button_tag "image_action", "keep", true %><%= t 'user.account.keep image' %>
<%= radio_button_tag "image_action", "delete" %><%= t 'user.account.delete image' %>
<%= radio_button_tag "image_action", "new" %><%= t 'user.account.replace image' %>
<%= f.file_field :image, :onchange => "$('image_action_new').prop('checked', true)" %>
<%= t 'user.account.image size hint' %>
- <% else %> - <%= hidden_field_tag "image_action", "new" %> - <%= t 'user.account.new image' %>
<%= f.file_field :image %>
<%= t 'user.account.image size hint' %> - <% end %> + + <%= user_image @user %> + + <% if @user.image.file? %> + + + + + <% end %> + <% if @user.image.file? || @user.image_use_gravatar? %> + + + + + <% end %> + <% if @user.image.file? %> + + + + + <% else %> + + + + + <% end %> + + + + +
<%= radio_button_tag "image_action", "keep", !@user.image_use_gravatar %><%= t 'user.account.keep image' %>
<%= radio_button_tag "image_action", "delete" %><%= t 'user.account.delete image' %>
<%= radio_button_tag "image_action", "new" %><%= t 'user.account.replace image' %>
<%= f.file_field :image, :onchange => "$('#image_action_new').prop('checked', true)" %>
<%= t 'user.account.image size hint' %>
<%= radio_button_tag "image_action", "new" %><%= t 'user.account.new image' %>
<%= f.file_field :image, :onchange => "$('#image_action_new').prop('checked', true)" %>
<%= t 'user.account.image size hint' %>
<%= radio_button_tag "image_action", "gravatar", @user.image_use_gravatar %><%= t 'user.account.gravatar.gravatar' %> (<%= t 'user.account.gravatar.link text' %>)
@@ -120,19 +130,10 @@ <% content_for :head do %> <%= javascript_include_tag "user" %> <% end %> - <% - home = @user.home_lat && @user.home_lon - data = { - :lon => @user.home_lon || 0, - :lat => @user.home_lat || 20, - :zoom => home ? 12 : 1, - :marker => !!home - } - %> - <%= content_tag "div", "", :id => "map", :class => "user_map set_location", :data => data %> + <%= content_tag "div", "", :id => "map", :class => "user_map set_location" %> - + <%= submit_tag t('user.account.save changes button') %>