]> git.openstreetmap.org Git - rails.git/blob - app/views/user/account.html.erb
3e8d1b0bf59e6521ad31c77ab05b821bfd39a739
[rails.git] / app / views / user / account.html.erb
1 <h2><%= t 'user.account.my settings' %></h2>
2 <%= error_messages_for 'user' %>
3 <%= form_for :user, :html => { :multipart => true } do |f| %>
4 <table id="accountForm">
5   <tr>
6     <td class="fieldName"><%= t 'user.new.display name' %></td>
7     <td><%= f.text_field :display_name %></td>
8   </tr>
9
10   <tr>
11     <td class="fieldName" style="padding-bottom:0px;"><%= t 'user.account.current email address' %></td>
12     <td style="padding-bottom:0px;"><%= @user.email %> <span class="minorNote"><%= t 'user.account.email never displayed publicly' %></span></td>
13   </tr>
14
15   <tr>
16     <td class="fieldName"><%= t 'user.account.new email address' %></td>
17     <td><%= f.email_field :new_email, {:size => 50, :maxlength => 255} %> <span class="minorNote"><%= t 'user.account.email never displayed publicly' %></span></td>
18   </tr>
19
20   <tr>
21     <td class="fieldName" style="padding-bottom:0px;"><%= t 'user.new.password' %></td>
22     <td style="padding-bottom:0px;"><%= f.password_field :pass_crypt, {:value => '', :size => 30, :maxlength => 255, :autocomplete => :off} %></td>
23   </tr>
24
25   <tr>
26     <td class="fieldName"><%= t 'user.new.confirm password' %></td>
27     <td><%= f.password_field :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255, :autocomplete => :off} %></td>
28   </tr>
29
30   <tr>
31     <td class="fieldName" ><%= t 'user.account.openid.openid' %></td>
32     <td><%= f.url_field :openid_url, {:id => "openid_url", :class => "openid_url"} %> <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span></td>
33   </tr>
34
35   <tr>
36     <td class="fieldName"><%= t 'user.account.public editing.heading' %></td>
37     <td>
38       <% if @user.data_public? %>
39         <%= t 'user.account.public editing.enabled' %> <span class="minorNote">(<a href="<%= t 'user.account.public editing.enabled link' %>" target="_new"><%= t 'user.account.public editing.enabled link text' %></a>)</span>
40       <% else %>
41         <%= t 'user.account.public editing.disabled' %> <span class="minorNote">(<a href="#public"><%= t 'user.account.public editing.disabled link text' %></a>)</span>
42       <% end %>
43     </td>
44   </tr>
45
46   <tr>
47     <td class="fieldName"><%= t 'user.account.contributor terms.heading' %></td>
48     <td>
49       <% if @user.terms_agreed? %>
50         <%= t 'user.account.contributor terms.agreed' %>
51         <span class="minorNote">(<a href="<%= t 'user.account.contributor terms.link' %>" target="_new"><%= t 'user.account.contributor terms.link text' %></a>)</span>
52         <br />
53         <% if @user.consider_pd? %>
54           <%= t 'user.account.contributor terms.agreed_with_pd' %>
55         <% end %>
56       <% else %>
57         <%= t 'user.account.contributor terms.not yet agreed' %> <br />
58
59         <%= link_to t('user.account.contributor terms.review link text'), :controller => 'user', :action => 'terms' %>
60       <% end %>
61     </td>
62   </tr>
63
64   <tr>
65     <td class="fieldName"><%= t 'user.account.profile description' %></td>
66     <td><%= f.text_area :description, :rows => '5', :cols => '60' %></td>
67   </tr>
68
69   <tr>
70     <td class="fieldName"><%= t 'user.account.preferred languages' %></td>
71     <td><%= f.text_field :languages %></td>
72   </tr>
73
74   <tr>
75     <td class="fieldName"><%= t 'user.account.preferred editor' %></td>
76     <td><%= f.select :preferred_editor, [[t("editor.default", :name => t("editor.#{DEFAULT_EDITOR}.name")), 'default']] + Editors::ALL_EDITORS.collect { |e| [t("editor.#{e}.description"), e] } %></td>
77   </tr>
78
79   <tr>
80     <td class="fieldName">
81       <%= t 'user.account.image' %>
82     </td>
83     <td valign="top">
84       <% if @user.image.file? %>
85         <table id="accountImage">
86           <tr>
87             <td rowspan="3" valign="top"><%= user_image @user %></td>
88             <td><%= radio_button_tag "image_action", "keep", true %></td>
89             <td><%= t 'user.account.keep image' %></td>
90           </tr>
91           <tr>
92             <td><%= radio_button_tag "image_action", "delete" %></td>
93             <td><%= t 'user.account.delete image' %></td>
94           </tr>
95           <tr>
96             <td><%= radio_button_tag "image_action", "new" %></td>
97             <td><%= t 'user.account.replace image' %><br /><%= f.file_field :image, :onchange => "$('image_action_new').prop('checked', true)" %><br /><span class="minorNote"><%= t 'user.account.image size hint' %></span></td>
98           </tr>
99         </table>
100       <% else %>
101         <%= hidden_field_tag "image_action", "new" %>
102         <%= t 'user.account.new image' %><br /><%= f.file_field :image %><br /><span class="minorNote"><%= t 'user.account.image size hint' %></span>
103       <% end %>
104     </td>
105   </tr>
106
107   <tr id="homerow" <% unless @user.home_lat and @user.home_lon %> class="nohome" <%end%> >
108     <td class="fieldName"><%= t 'user.account.home location' %></td>
109     <td><em class="message"><%= t 'user.account.no home location' %></em><span class="location"><%= t 'user.account.latitude' %> <%= f.text_field :home_lat, :size => 20, :id => "home_lat" %> <%= t 'user.account.longitude' %><%= f.text_field :home_lon, :size => 20, :id => "home_lon" %></span></td>
110   </tr>
111
112   <tr>
113     <td></td>
114     <td>
115       <p><%= t 'user.account.update home location on click' %> <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" /> </p>
116       <div id="map" class="user_map"></div>
117     </td>
118   </tr>
119   
120   <tr>
121     <td></td>
122     <td class="submitButton"><%= submit_tag t('user.account.save changes button') %></td>
123   </tr>
124 </table>
125 <% end %>
126
127 <%= render :partial => 'map', :locals => { :setting_location => true,  :show_other_users => false } %>
128
129 <% unless @user.data_public? %>
130 <a name="public"></a>
131 <h2><%= t 'user.account.public editing note.heading' %></h2>
132 <%= raw t 'user.account.public editing note.text' %>
133   <%= button_to t('user.account.make edits public button'), :action => :go_public %>
134 <% end %>
135 <br/>
136 <br/>
137 <%= link_to t('user.account.return to profile'), :controller => 'user', :action => @user.display_name %>
138 <br/>
139 <br/>