]> git.openstreetmap.org Git - rails.git/blob - app/views/accounts/edit.html.erb
Fix route for "go public" button on the account edit page
[rails.git] / app / views / accounts / edit.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "user" %>
3 <% end %>
4
5 <% content_for :heading do %>
6   <h1><%= t ".my settings" %></h1>
7 <% end %>
8
9 <%= render :partial => "settings_menu" %>
10
11 <%= bootstrap_form_for current_user, :url => { :action => :update }, :html => { :multipart => true, :id => "accountForm", :autocomplete => :off } do |f| %>
12
13   <%= f.text_field :display_name %>
14   <%= f.email_field :email, :disabled => true, :label => t(".current email address") %>
15   <%= f.email_field :new_email, :autocomplete => "email" %>
16   <%= f.password_field :pass_crypt, :value => "", :autocomplete => "new-password" %>
17   <%= f.password_field :pass_crypt_confirmation, :value => "", :autocomplete => "new-password" %>
18
19   <fieldset class="form-group">
20     <label for="user_auth_provider"><%= t(".external auth") %></label>
21     <div class="form-row">
22       <%= f.select(:auth_provider, Auth.providers, :hide_label => true, :wrapper => { :class => "col-auto mb-0" }) %>
23       <%= f.text_field(:auth_uid, :hide_label => true, :wrapper => { :class => "col mb-0" }) %>
24     </div>
25     <small class="form-text text-muted">(<a href="<%= t ".openid.link" %>" target="_new"><%= t ".openid.link text" %></a>)</small>
26   </fieldset>
27
28   <div class="form-group">
29     <label><%= t ".public editing.heading" %></label>
30     <span class="form-text text-muted">
31       <% if current_user.data_public? %>
32         <%= t ".public editing.enabled" %>
33         (<a href="<%= t ".public editing.enabled link" %>" target="_new"><%= t ".public editing.enabled link text" %></a>)
34       <% else %>
35         <%= t ".public editing.disabled" %>
36         (<a href="#public"><%= t ".public editing.disabled link text" %></a>)
37       <% end %>
38     </span>
39   </div>
40
41   <div class="form-group">
42     <label><%= t ".contributor terms.heading" %></label>
43     <span class="form-text text-muted">
44       <% if current_user.terms_agreed? %>
45         <%= t ".contributor terms.agreed" %>
46         (<a href="<%= t ".contributor terms.link" %>" target="_new"><%= t ".contributor terms.link text" %></a>)
47         <% if current_user.consider_pd? %>
48           <%= t ".contributor terms.agreed_with_pd" %>
49         <% end %>
50       <% else %>
51         <%= t ".contributor terms.not yet agreed" %>
52         <%= link_to t(".contributor terms.review link text"), :controller => "users", :action => "terms" %>
53       <% end %>
54     </span>
55   </div>
56
57   <%= f.primary t(".save changes button") %>
58 <% end %>
59
60 <% unless current_user.data_public? %>
61 <a name="public"></a>
62 <h2><%= t ".public editing note.heading" %></h2>
63 <%= t ".public editing note.html" %>
64   <%= button_to t(".make edits public button"), user_go_public_path %>
65 <% end %>