Permalink
Browse files

Fixed reset passwords

  • Loading branch information...
1 parent 98ed54f commit a453c42e604c882d6ce812d8fc125803c8cedade @spob committed Feb 26, 2011
Showing with 12 additions and 12 deletions.
  1. +11 −11 app/views/users/show.rhtml
  2. +1 −1 config/routes.rb
View
@@ -1,33 +1,33 @@
-<%= javascript_include_tag "wz_tooltip.js", :cache => "cache/tooltip" %>
+<%= javascript_include_tag "wz_tooltip.js", :cache => "cache/tooltip" %>
<%= render :partial => "tab_menu"%>
<div id="tabBody" style="position:relative; padding-top:15px;">
<div id="actionButtons2">
<%= link_to '<',
- option = { :action => 'previous', :id => @user },
+ option = { :action => 'previous', :id => @user },
html_options = { :class => 'button',
:onmouseover => "Tip('View the previous user')"} %>
<%= link_to '>',
- option = { :action => 'next', :id => @user },
+ option = { :action => 'next', :id => @user },
html_options = {:class => 'button',
:onmouseover => "Tip('View the next user')"} %>
<% restrict_to "sysadmin" do %>
- <%= link_to 'New User', option = {:action => 'new'},
+ <%= link_to 'New User', option = {:action => 'new'},
html_options = { :class=> "button",
:onmouseover => "Tip('Create a new user')"} %>
- <%= link_to 'Edit', option = {:action => 'edit', :id => @user},
+ <%= link_to 'Edit', option = {:action => 'edit', :id => @user},
html_options = { :class=> "button",
:onmouseover => "Tip('Edit this user')"} %>
<% end %>
<% restrict_to "sysadmin" do %>
- <%= link_to 'Reset Password', options = { :action => 'reset_password', :id => @user },
- html_options = {:method => :post,
+ <%= link_to 'Reset Password', reset_password_user_path(@user),
+ html_options = {:method => :post,
:class => "button",
:onmouseover => "Tip('Reset the password for this user')" } %>
<% end %>
</div>
<div class="formTitle"><%=theme_image_tag("icons/16x16/user.png", :alt=>"Edit User")%>User Detail</div>
-
+
<div class="cssform" style="margin-top:0;">
<p>
<label for="email">Email:</label>
@@ -90,7 +90,7 @@
<% for allocation in @user.allocations %>
&bull;&nbsp;
<%= strike_text(
- "Allocation of quantity #{allocation.quantity} (#{pluralize allocation.votes.size, 'vote'} used) expires on #{om_date_time(allocation.expiration_date)}",
+ "Allocation of quantity #{allocation.quantity} (#{pluralize allocation.votes.size, 'vote'} used) expires on #{om_date_time(allocation.expiration_date)}",
allocation.expiration_date <= DateUtils.today_utc) %>
<br/>
<% end %>
@@ -100,7 +100,7 @@
<% for eallocation in @user.enterprise.allocations %>
&bull;&nbsp;
<%= strike_text(
- "Allocation of quantity #{eallocation.quantity} (#{pluralize eallocation.votes.size, 'vote'} used) expires on #{om_date_time(eallocation.expiration_date)}",
+ "Allocation of quantity #{eallocation.quantity} (#{pluralize eallocation.votes.size, 'vote'} used) expires on #{om_date_time(eallocation.expiration_date)}",
eallocation.expiration_date <= DateUtils.today_utc) %>
<br/>
<% end %>
@@ -121,4 +121,4 @@
<br />
<% end %>
</div>
-</div>
+</div>
View
@@ -44,7 +44,7 @@
map.resources :topics, :collection => {:preview => :get, :search => :get,
:tag => :get}, :member => {:rate => :post, :toggle_status => :put}
map.resources :users,
- :member => {:update_profile => :put, :reset_password => :get},
+ :member => {:update_profile => :put, :reset_password => :post},
:collection => {:activity => :get, :edit_profile => :get, :auto_complete_for_user_email => :get, :list => :get,
:process_imported => :post, :import => :get, :fetch_otp => :post, :export_import => :get,
:lost_password => :get}

0 comments on commit a453c42

Please sign in to comment.