]> git.openstreetmap.org Git - rails.git/blob - app/views/users/new.html.erb
918b315e8aca21de45a1bfe95a2ca62d69cd7881
[rails.git] / app / views / users / new.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "user" %>
3   <%= javascript_include_tag "auth_providers" %>
4 <% end %>
5
6 <% content_for :heading_class, "p-0 mw-100" %>
7
8 <% content_for :heading do %>
9   <div class="header-illustration new-user-main auth-container mx-auto">
10     <h1 class="pt-3"><%= t ".title" %></h1>
11   </div>
12 <% end %>
13
14 <div class="auth-container mx-auto my-0">
15   <% if current_user.auth_uid.nil? %>
16     <div class="text-muted fs-6">
17       <p><strong><%= t ".about.header" %></strong> <%= t ".about.paragraph_1" %></p>
18       <p><%= t ".about.paragraph_2" %></p>
19     </div>
20   <% else %>
21     <h4><%= t ".about.welcome" %></h4>
22   <% end %>
23
24   <%= bootstrap_form_for current_user, :url => { :action => "create" } do |f| %>
25     <%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %>
26     <%= hidden_field_tag("verified_email", h(@verified_email)) unless @verified_email.nil? %>
27     <%= f.hidden_field :auth_provider unless current_user.auth_provider.nil? %>
28     <%= f.hidden_field :auth_uid unless current_user.auth_uid.nil? %>
29
30     <% if current_user.auth_uid.nil? or not current_user.errors[:email].empty? %>
31       <%= f.email_field :email, :help => t(".email_help_html",
32                                            :privacy_policy_link => link_to(t(".privacy_policy"),
33                                                                            t(".privacy_policy_url"),
34                                                                            :title => t(".privacy_policy_title"),
35                                                                            :target => :new)),
36                                 :tabindex => 1 %>
37     <% else %>
38       <%= f.hidden_field :email %>
39     <% end %>
40
41     <%= f.text_field :display_name, :help => t(".display name description"), :tabindex => 2 %>
42
43     <% if current_user.auth_uid.nil? %>
44       <div class="row">
45         <div class="col-sm">
46           <%= f.password_field :pass_crypt, :tabindex => 3 %>
47         </div>
48         <div class="col-sm">
49           <%= f.password_field :pass_crypt_confirmation, :tabindex => 4 %>
50         </div>
51       </div>
52     <% end %>
53
54     <p class="mb-3 text-muted"><%= t(".by_signing_up_html",
55                                      :tou_link => link_to(t("layouts.tou"),
56                                                           "https://wiki.osmfoundation.org/wiki/Terms_of_Use",
57                                                           :target => :new),
58                                      :privacy_policy_link => link_to(t(".privacy_policy"),
59                                                                      t(".privacy_policy_url"),
60                                                                      :title => t(".privacy_policy_title"),
61                                                                      :target => :new),
62                                      :contributor_terms_link => link_to(t(".contributor_terms"),
63                                                                         t(".contributor_terms_url"),
64                                                                         :target => :new)) %></p>
65
66     <%= f.form_group do %>
67       <%= f.check_box :consider_pd,
68                       :tabindex => 5,
69                       :label => t(".consider_pd_html",
70                                   :consider_pd_link => link_to(t(".consider_pd"),
71                                                                t(".consider_pd_url"),
72                                                                :target => :new)) %>
73     <% end %>
74
75     <div class="mb-3">
76       <%= submit_tag(t(".continue"), :name => "continue", :id => "continue", :class => "btn btn-primary", :tabindex => 6) %>
77     </div>
78   <% end %>
79
80   <% if current_user.auth_uid.nil? %>
81     <hr>
82     <%= render :partial => "auth_providers" %>
83   <% end %>
84 </div>