]> git.openstreetmap.org Git - rails.git/blob - app/views/user/account.html.erb
Fix lists in rich text to display properly
[rails.git] / app / views / user / account.html.erb
1 <% content_for :heading do %>
2   <h2><%= t 'user.account.my settings' %></h2>
3   <ul class='secondary-actions clearfix'>
4     <li><%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %></li>
5     <li><%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %></li>
6   </ul>
7 <% end %>
8
9 <%= error_messages_for 'user' %>
10 <%= form_for :user, :html => { :multipart => true } do |f| %>
11 <table id="accountForm">
12   <tr>
13     <td class="fieldName"><%= t 'user.new.display name' %></td>
14     <td><%= f.text_field :display_name %></td>
15   </tr>
16
17   <tr>
18     <td class="fieldName" style="padding-bottom:0px;"><%= t 'user.account.current email address' %></td>
19     <td style="padding-bottom:0px;"><%= @user.email %> <span class="minorNote"><%= t 'user.account.email never displayed publicly' %></span></td>
20   </tr>
21
22   <tr>
23     <td class="fieldName"><%= t 'user.account.new email address' %></td>
24     <td><%= f.email_field :new_email, {:size => 50, :maxlength => 255} %> <span class="minorNote"><%= t 'user.account.email never displayed publicly' %></span></td>
25   </tr>
26
27   <tr>
28     <td class="fieldName" style="padding-bottom:0px;"><%= t 'user.new.password' %></td>
29     <td style="padding-bottom:0px;"><%= f.password_field :pass_crypt, {:value => '', :size => 30, :maxlength => 255, :autocomplete => :off} %></td>
30   </tr>
31
32   <tr>
33     <td class="fieldName"><%= t 'user.new.confirm password' %></td>
34     <td><%= f.password_field :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255, :autocomplete => :off} %></td>
35   </tr>
36
37   <tr>
38     <td class="fieldName" ><%= t 'user.account.openid.openid' %></td>
39     <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>
40   </tr>
41
42   <tr>
43     <td class="fieldName"><%= t 'user.account.public editing.heading' %></td>
44     <td>
45       <% if @user.data_public? %>
46         <%= 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>
47       <% else %>
48         <%= t 'user.account.public editing.disabled' %> <span class="minorNote">(<a href="#public"><%= t 'user.account.public editing.disabled link text' %></a>)</span>
49       <% end %>
50     </td>
51   </tr>
52
53   <tr>
54     <td class="fieldName"><%= t 'user.account.contributor terms.heading' %></td>
55     <td>
56       <% if @user.terms_agreed? %>
57         <%= t 'user.account.contributor terms.agreed' %>
58         <span class="minorNote">(<a href="<%= t 'user.account.contributor terms.link' %>" target="_new"><%= t 'user.account.contributor terms.link text' %></a>)</span>
59         <br />
60         <% if @user.consider_pd? %>
61           <%= t 'user.account.contributor terms.agreed_with_pd' %>
62         <% end %>
63       <% else %>
64         <%= t 'user.account.contributor terms.not yet agreed' %> <br />
65
66         <%= link_to t('user.account.contributor terms.review link text'), :controller => 'user', :action => 'terms' %>
67       <% end %>
68     </td>
69   </tr>
70
71   <tr>
72     <td class="fieldName"><%= t 'user.account.profile description' %></td>
73     <td><%= richtext_area :user, :description, :rows => '15', :cols => '80' %></td>
74   </tr>
75
76   <tr>
77     <td class="fieldName"><%= t 'user.account.preferred languages' %></td>
78     <td><%= f.text_field :languages %></td>
79   </tr>
80
81   <tr>
82     <td class="fieldName"><%= t 'user.account.preferred editor' %></td>
83     <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>
84   </tr>
85
86   <tr>
87     <td class="fieldName">
88       <%= t 'user.account.image' %>
89     </td>
90     <td class="accountImage">
91       <%= user_image @user %>
92       <table class="accountImage-options">
93         <% if @user.image.file? %>
94         <tr>
95           <td><%= radio_button_tag "image_action", "keep", !@user.image_use_gravatar %></td>
96           <td><%= t 'user.account.keep image' %></td>
97         </tr>
98         <% end %>
99         <% if @user.image.file? || @user.image_use_gravatar? %>
100         <tr>
101           <td><%= radio_button_tag "image_action", "delete" %></td>
102           <td><%= t 'user.account.delete image' %></td>
103         </tr>
104         <% end %>
105         <% if @user.image.file? %>
106         <tr>
107           <td><%= radio_button_tag "image_action", "new" %></td>
108           <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>
109         </tr>
110         <% else %>
111         <tr>
112           <td><%= radio_button_tag "image_action", "new" %></td>
113           <td><%= t 'user.account.new 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>
114         </tr>
115         <% end %>
116         <tr>
117           <td><%= radio_button_tag "image_action", "gravatar", @user.image_use_gravatar %></td>
118           <td><%= t 'user.account.gravatar.gravatar' %> <span class="minorNote">(<a href="<%= t 'user.account.gravatar.link' %>" target="_new"><%= t 'user.account.gravatar.link text' %></a>)</span></td>
119         </tr>
120       </table>
121     </td>
122   </tr>
123
124   <tr id="homerow" <% unless @user.home_lat and @user.home_lon %> class="nohome" <%end%> >
125     <td class="fieldName"><%= t 'user.account.home location' %></td>
126     <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>
127   </tr>
128
129   <tr>
130     <td></td>
131     <td>
132       <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>
133       <% content_for :head do %>
134         <%= javascript_include_tag "user" %>
135       <% end %>
136       <%= content_tag "div", "", :id => "map", :class => "content_map settings_map set_location" %>
137     </td>
138   </tr>
139
140   <tr>
141     <td></td>
142     <td class="submitButton"><%= submit_tag t('user.account.save changes button') %></td>
143   </tr>
144 </table>
145 <% end %>
146
147 <% unless @user.data_public? %>
148 <a name="public"></a>
149 <h2><%= t 'user.account.public editing note.heading' %></h2>
150 <%= raw t 'user.account.public editing note.text' %>
151   <%= button_to t('user.account.make edits public button'), :action => :go_public %>
152 <% end %>