Moving password field and fixing a nil error in appcontroller
This commit is contained in:
parent
6d0a7b165a
commit
95374a8c1f
|
@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
rescue_from CanCan::AccessDenied do |exception|
|
rescue_from CanCan::AccessDenied do |exception|
|
||||||
if current_user.orientation.blank? then
|
if !current_user.nil? && current_user.orientation.blank? then
|
||||||
flash[:alert] = "Sorry, you need to complete New Member Orientation before having access to this page. <br/>Please check your email and schedule a New Member Orientation with a volunteer."
|
flash[:alert] = "Sorry, you need to complete New Member Orientation before having access to this page. <br/>Please check your email and schedule a New Member Orientation with a volunteer."
|
||||||
redirect_to root_url
|
redirect_to root_url
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,6 +24,20 @@
|
||||||
<%= f.label :email %><br />
|
<%= f.label :email %><br />
|
||||||
<%= f.email_field :email %>
|
<%= f.email_field :email %>
|
||||||
</div>
|
</div>
|
||||||
|
<% if @user.id.blank? || !params[:password].nil? %>
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :password %><br />
|
||||||
|
<%= f.password_field :password, :autocomplete => "off" %>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :password_confirmation %><br />
|
||||||
|
<%= f.password_field :password_confirmation %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="field">
|
||||||
|
<a href="?password=edit">Change Password</a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<%= f.label :waiver %><br />
|
<%= f.label :waiver %><br />
|
||||||
<%= f.date_select :waiver, :include_blank => 'true', :default => 'nil' %>
|
<%= f.date_select :waiver, :include_blank => 'true', :default => 'nil' %>
|
||||||
|
@ -64,20 +78,6 @@
|
||||||
<%= f.label :desired_skills %><br />
|
<%= f.label :desired_skills %><br />
|
||||||
<%= f.text_area :desired_skills %>
|
<%= f.text_area :desired_skills %>
|
||||||
</div>
|
</div>
|
||||||
<% if @user.id.blank? || !params[:password].nil? %>
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password %><br />
|
|
||||||
<%= f.password_field :password, :autocomplete => "off" %>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password_confirmation %><br />
|
|
||||||
<%= f.password_field :password_confirmation %>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<div class="field">
|
|
||||||
<a href="?password=edit">Change Password</a>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<%= f.label :member, "Member?" %><br />
|
<%= f.label :member, "Member?" %><br />
|
||||||
<%= f.select :member, [[nil],["No",0],["Inactive",1],["Volunteer",10],["Associate",25],["Basic",50],["Plus",100]] %>
|
<%= f.select :member, [[nil],["No",0],["Inactive",1],["Volunteer",10],["Associate",25],["Basic",50],["Plus",100]] %>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user