]> git.openstreetmap.org Git - rails.git/blob - app/views/users/account.html.erb
Move profile-related settings to their own form
[rails.git] / app / views / users / account.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   <ul class='secondary-actions clearfix'>
8     <li><%= link_to t(".return to profile"), user_path(current_user) %></li>
9     <li><%= link_to t(".oauth1 settings"), oauth_clients_path %></li>
10     <li><%= link_to t(".oauth2 applications"), oauth_applications_path %></li>
11     <li><%= link_to t(".oauth2 authorizations"), oauth_authorized_applications_path %></li>
12   </ul>
13 <% end %>
14
15 <%= bootstrap_form_for current_user, :url => { :action => :account }, :method => :post, :html => { :multipart => true, :id => "accountForm", :autocomplete => :off } do |f| %>
16
17   <%= f.text_field :display_name %>
18   <%= f.email_field :email, :disabled => true, :label => t(".current email address") %>
19   <%= f.email_field :new_email, :autocomplete => "email" %>
20   <%= f.password_field :pass_crypt, :value => "", :autocomplete => "new-password" %>
21   <%= f.password_field :pass_crypt_confirmation, :value => "", :autocomplete => "new-password" %>
22
23   <fieldset class="form-group">
24     <label for="user_auth_provider"><%= t(".external auth") %></label>
25     <div class="form-row">
26       <%= f.select(:auth_provider, Auth.providers, :hide_label => true, :wrapper => { :class => "col-auto mb-0" }) %>
27       <%= f.text_field(:auth_uid, :hide_label => true, :wrapper => { :class => "col mb-0" }) %>
28     </div>
29     <small class="form-text text-muted">(<a href="<%= t ".openid.link" %>" target="_new"><%= t ".openid.link text" %></a>)</small>
30   </fieldset>
31
32   <div class="form-group">
33     <label><%= t ".public editing.heading" %></label>
34     <span class="form-text text-muted">
35       <% if current_user.data_public? %>
36         <%= t ".public editing.enabled" %>
37         (<a href="<%= t ".public editing.enabled link" %>" target="_new"><%= t ".public editing.enabled link text" %></a>)
38       <% else %>
39         <%= t ".public editing.disabled" %>
40         (<a href="#public"><%= t ".public editing.disabled link text" %></a>)
41       <% end %>
42     </span>
43   </div>
44
45   <div class="form-group">
46     <label><%= t ".contributor terms.heading" %></label>
47     <span class="form-text text-muted">
48       <% if current_user.terms_agreed? %>
49         <%= t ".contributor terms.agreed" %>
50         (<a href="<%= t ".contributor terms.link" %>" target="_new"><%= t ".contributor terms.link text" %></a>)
51         <% if current_user.consider_pd? %>
52           <%= t ".contributor terms.agreed_with_pd" %>
53         <% end %>
54       <% else %>
55         <%= t ".contributor terms.not yet agreed" %>
56         <%= link_to t(".contributor terms.review link text"), :controller => "users", :action => "terms" %>
57       <% end %>
58     </span>
59   </div>
60
61   <%= f.primary t(".save changes button") %>
62 <% end %>
63
64 <% unless current_user.data_public? %>
65 <a name="public"></a>
66 <h2><%= t ".public editing note.heading" %></h2>
67 <%= t ".public editing note.html" %>
68   <%= button_to t(".make edits public button"), :action => :go_public %>
69 <% end %>