First half of a password reset function

This commit is contained in:
Steve Coast 2006-11-17 13:31:15 +00:00
parent e62fe92282
commit f864203056
10 changed files with 60 additions and 24 deletions

View file

@ -21,11 +21,11 @@
<span id="greeting">
<% if @user %>
Welcome, <%= @user.email %> |
<%= link_to 'Logout', {:controller => 'user', :action => 'logout'}, {:id => 'loginanchor'}%>
Welcome, <%= @user.display_name %> |
<%= link_to 'logout', {:controller => 'user', :action => 'logout'}, {:id => 'loginanchor'}%>
<% else %>
<%= link_to 'Login', {:controller => 'user', :action => 'login'}, {:id => 'loginanchor'}%> |
<%= link_to 'Sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
<%= link_to 'log in', {:controller => 'user', :action => 'login'}, {:id => 'loginanchor'}%> |
<%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
<% end %>
</span>

View file

@ -0,0 +1,8 @@
Hi,
Someone (possibly you) has asked for the password to be reset on this
email addresses openstreetmap.org account.
If this is you, please click the link below to reset your password.
<%= @url %>

View file

@ -3,11 +3,11 @@ Please login or <%= link_to 'create an account', :controller => 'user', :action
<%= start_form_tag :action => 'login' %>
<table>
<tr><td>Login name</td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>email address:</td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>password:</td><td><%= password_field('user', 'password',{:size => 50, :maxlength => 255}) %></td></tr>
</table>
<br>
<input type="submit" value="Login">
<%= end_form_tag %> (<%= link_to 'Forgotten your password?', :controller => 'user', :action => 'lost_password' %>)
<%= end_form_tag %> (<%= link_to 'Lost your password?', :controller => 'user', :action => 'lost_password' %>)

View file

@ -0,0 +1,8 @@
<h1>Forgotten Password?</h1><br>
<%= start_form_tag :action => 'lost_password' %>
<table>
<tr><td>email address:</td><td><%= text_field('user', 'email', {:size => 50, :maxlength => 255} ) %></td></tr>
</table>
<br>
<input type="submit" value="Send me a new password">

View file

@ -1,14 +1,14 @@
<h1>Create a user account</h1><br>
Fill in the form and we'll send you a quick email to activate your account.<br><br>
By creating an account, you agree that all work uploaded to openstreetmap.org and all data created by use of any tools on openstreetmap.org is to be licensed under <a href="http://creativecommons.org/licenses/by-sa/2.0/">this</a> Creative Commons license.<br><br>
By creating an account, you agree that all work uploaded to openstreetmap.org and all data created by use of any tools which connect to openstreetmap.org is to be licensed under this <a href="http://creativecommons.org/licenses/by-sa/2.0/">this Creative Commons license (by-sa)</a>.<br><br>
<%= error_messages_for 'user' %>
<%= start_form_tag :action => 'save' %>
<table>
<tr><td>email address:</td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>Login name</td><td><%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>email:</td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>login name</td><td><%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>password:</td><td><%= password_field('user', 'pass_crypt',{:size => 50, :maxlength => 255}) %></td></tr>
<tr><td>retype password:</td><td><%= password_field('user', 'pass_crypt_confirmation',{:size => 50, :maxlength => 255}) %></td></tr>
</table>