Permalink
Browse files

adds gender to forms and show

  • Loading branch information...
1 parent fb0b90d commit 6e18f78a8a00e2557ba8ab00601b17e007e2bd29 @jmabry111 committed Oct 3, 2012
View
@@ -1,7 +1,7 @@
class Applicant < ActiveRecord::Base
attr_accessible :address, :email, :english_teacher, :first_name, :gender, :grade, :home_phone, :last_name,
:math_teacher, :middle_name, :parent_first_name, :parent_last_name, :school_id, :science_teacher, :work_phone,
- :school_phone, :counselor_name, :due_to, :date_due
+ :school_phone, :counselor_name, :due_to, :date_due, :english_teacher_email, :science_teacher_email, :math_teacher_email
belongs_to :school
before_save :strip_extra_characters
@@ -4,6 +4,7 @@
<%= f.input :first_name, :label => "First Name" %>
<%= f.input :middle_name, :label => "Middle Name" %>
<%= f.input :last_name, :label => "Last Name" %>
+ <%= f.input :gender, :collection => ["Male", "Female"], :as => :radio_buttons, :item_wrapper_class => :inline %>
<%= f.input :grade, :collection => ["11", "12"], :as => :radio_buttons, :item_wrapper_class => :inline %>
<%= f.input :parent_first_name, :label => "Parent/Guardian First Name" %>
<%= f.input :parent_last_name, :label => "Parent/Guardian Last Name" %>
@@ -6,6 +6,8 @@
<%= f.input :first_name, :label => "First Name", :input_html => {:value => @applicant.first_name} %>
<%= f.input :middle_name, :label => "Middle Name", :input_html => {:value => @applicant.middle_name} %>
<%= f.input :last_name, :label => "Last Name", :input_html => {:value => @applicant.last_name} %>
+ <%= f.input :gender, :collection => ["Male", "Female"], :as => :radio_buttons, :input_html => {:value => @applicant.gender},
+ :item_wrapper_class => :inline %>
<%= f.input :grade,:collection => ["11", "12"], :as => :radio_buttons, :label => "Grade", :input_html => {:value => @applicant.grade},
:item_wrapper_class => :inline%>
<%= f.input :parent_first_name, :label => "Parent/Guardian First Name", :input_html => {:value => @applicant.parent_first_name} %>
@@ -26,7 +28,7 @@
</p>
</div>
<div class="span6 offset3">
- <%= f.input :school, :input_html => {:value => @applicant.school.name}%>
+ <h3>School: <%= @applicant.school.name %></h3><br /><br />
<%= f.input :school_phone, :label => "School Phone" %>
<%= f.input :counselor_name, :label => "Name of Guidance Counselor Designee" %>
<p>
@@ -1,6 +1,6 @@
<div class="center hero-unit">
<h1>Thank you for signing out.</h1>
<p>
- You may <%= link_to "log back in", new_user_session_path %> at any time, or <%= link_to "start from the beginning", root_path %>.
+ You may <%= link_to "sign back in", new_user_session_path %> at any time, or <%= link_to "start from the beginning", root_path %>.
</p>
</div>

0 comments on commit 6e18f78

Please sign in to comment.