<%-# Fedena #Copyright 2010 Foradian Technologies Private Limited # #This product includes software developed at #Project Fedena - http://www.projectfedena.org/ # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, #software distributed under the License is distributed on an #"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #KIND, either express or implied. See the License for the #specific language governing permissions and limitations #under the License. -%>

<%= t('admission') %>

<%= t('parent_guardian_details_step2') %>

<% unless flash[:notice].nil? %>

<%= flash[:notice] %>

<% end %>
<% unless @student.guardians.empty? %> <% end %>
<% form_for :guardian do |f| %> <%= f.error_messages :header_message => nil %>
<%= @student.admission_no %>
<%= f.hidden_field :ward_id, :value => @student.id %>

<%= t('parent') %> - <%= t('personal_details') %>
<%= f.text_field :first_name %>

<%= f.text_field :last_name %>

<%= f.text_field :relation %>

<%= calendar_date_select_tag 'guardian[dob]', nil, :year_range => 60.years.ago..20.years.ago, :readonly=>true, :popup=>"force" %>

<%= f.text_field :education %>

<%= f.text_field :occupation %>

<%= f.text_field :income %>

<%= t("parent") %> - <%= t('contact_details') %>
<%= f.text_field :email %>

<% unless @student.address_line1.empty? %>
<%= f.text_field :office_address_line1,:value=>@student.address_line1 %>
<% else %>
<%= f.text_field :office_address_line1 %>
<% end %>

<% unless @student.address_line2.empty? %>
<%= f.text_field :office_address_line2,:value=>@student.address_line2 %>
<% else %>
<%= f.text_field :office_address_line2 %>
<% end %>

<% unless @student.city.empty? %>
<%= f.text_field :city,:value=>@student.city %>
<% else %>
<%= f.text_field :city %>
<% end %>

<% unless @student.state.empty? %>
<%= f.text_field :state,:value=>@student.state %>
<% else %>
<%= f.text_field :state %>
<% end %>

<% unless @student.country.nil? %>
<%= select :guardian, :country_id, Country.all.map {|c| [c.name, c.id]}, :selected => @student.country_id %>
<% else %>
<%= select :guardian, :country_id, Country.all.map {|c| [c.name, c.id]}, :selected => 76 %>
<% end %>

<%= f.text_field :office_phone1 %>

<%= f.text_field :office_phone2 %>

<%= f.text_field :mobile_phone %>

<%= submit_tag "", :value => " ► #{t('finish')}", :name => "commit", :class => "submit_button3" %>
<% end %>