]> git.openstreetmap.org Git - rails.git/blob - app/views/accounts/show.html.erb
Merge remote-tracking branch 'upstream/pull/6251'
[rails.git] / app / views / accounts / show.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "user" %>
3 <% end %>
4
5 <% content_for :heading do %>
6   <h1><%= t ".my_account" %></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="mb-3">
20     <label for="user_auth_provider" class="form-label"><%= t(".external auth") %></label>
21     <div class="row">
22       <%= f.select :auth_provider,
23                    Auth.providers.map { |provider| [I18n.t("auth.providers.#{provider}"), provider] },
24                    :include_blank => t("auth.providers.none"),
25                    :hide_label => true,
26                    :wrapper => { :class => "col-auto mb-0" } %>
27     </div>
28   </fieldset>
29
30   <div class="row justify-content-between g-1">
31     <div class="col-auto">
32       <%= f.primary t(".save changes button") %>
33     </div>
34     <div class="col-auto">
35       <%= link_to t(".delete_account"), account_deletion_path, :class => "btn btn-outline-danger" %>
36     </div>
37   </div>
38
39 <% end %>
40
41 <hr>
42
43 <div class="row">
44   <section class="col-md-6 mb-3">
45     <h2 class="fs-6 fw-normal"><%= t ".contributor_terms.heading" %></h2>
46     <div class="small text-body-secondary">
47       <% if current_user.terms_agreed? %>
48         <%= t ".contributor_terms.agreed", :date => l(@current_user.terms_agreed.to_date, :format => :long) %>
49       <% else %>
50         <%= t ".contributor_terms.not_agreed" %>
51       <% end %>
52       <br>
53       <% if current_user.consider_pd? %>
54         <%= t ".contributor_terms.agreed_with_pd" %>
55       <% else %>
56         <%= t ".contributor_terms.not_agreed_with_pd" %>
57       <% end %>
58       <br class="mb-1">
59       <%= link_to current_user.terms_agreed? ? t(".contributor_terms.review") : t(".contributor_terms.review_and_accept"), account_terms_path %>
60       <% unless current_user.consider_pd? %>
61         &middot;
62         <%= link_to t(".contributor_terms.consider_pd"), account_pd_declaration_path %>
63       <% end %>
64     </div>
65   </section>
66
67   <section class="col-md-6 mb-3">
68     <h2 class="fs-6 fw-normal"><%= t ".terms_of_use.heading" %></h2>
69     <div class="small text-body-secondary">
70       <% if current_user.tou_agreed? %>
71         <%= t ".terms_of_use.agreed", :date => l(@current_user.tou_agreed.to_date, :format => :long) %>
72       <% else %>
73         <%= t ".terms_of_use.not_agreed" %>
74       <% end %>
75       <br class="mb-1">
76       <%= link_to current_user.tou_agreed? ? t(".terms_of_use.review") : t(".terms_of_use.review_and_accept"), account_terms_path %>
77     </div>
78   </section>
79 </div>
80
81 <% unless current_user.data_public? %>
82   <%= render :partial => "go_public" %>
83 <% end %>