recruitment/app/views/recruitments/_employee_form.html.erb

199 lines
7.3 KiB
Plaintext
Raw Normal View History

2018-01-01 13:52:15 +00:00
<%# content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
<%# end %>
<%# content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
<%= javascript_include_tag "lib/file-type" %>
<%# end %>
<style type="text/css">
.header-title{
text-align: center;
}
hr{
border-top: 1px solid #5c5c5c;
}
.bootstrap-datetimepicker-widget ul{
list-style: none;
padding: 10px 25px;
text-align: center;
}
.bootstrap-datetimepicker-widget ul td,th{
cursor: pointer;
text-align: center;
}
.bootstrap-datetimepicker-widget ul td.old, td.new{
color: #cecece;
}
.bootstrap-datetimepicker-widget ul td:hover,th:hover{
background-color: #5c5c5c;
color: #fff;
}
.bootstrap-datetimepicker-widget span.month{
width: 50px;
}
.default_picker span.add-on{
padding: 3px;
margin-left: 5px;
cursor: pointer;
height: 20px;
width: 20px;
text-align: center;
}
</style>
<h3 class="header-title">Employee / Fresher Personal Profile</h3>
<hr>
<%= f.fields_for :employee_profile do |fe| %>
<!-- Gender -->
<div class="form-group">
<label class="col-sm-2 control-label">Gender</label>
<div class="col-sm-8">
<label for="recruit_profile_employee_profile_attributes_gender_type1" class="control-label radio-label">
<%= fe.radio_button :gender, "type1" %> Male
</label>
<label for="recruit_profile_employee_profile_attributes_gender_type2" class="control-label radio-label">
<%= fe.radio_button :gender, "type2" %> Female
</label>
<label for="recruit_profile_employee_profile_attributes_gender_type3" class="control-label radio-label">
<%= fe.radio_button :gender, "type3" %> Other
</label>
</div>
</div>
<!-- DOB -->
<div class="form-group">
<%= fe.label :dob, "Date of Birth", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.datetime_picker :dob, :no_label => true, :new_record => @profile.new_record? %>
</div>
</div>
<!-- Martial status -->
<div class="form-group">
<label class="col-sm-2 control-label">Martial Status</label>
<div class="col-sm-8">
<label for="recruit_profile_employee_profile_attributes_marital_status_type1" class="control-label radio-label">
<%= fe.radio_button :marital_status, "type1" %> Un-Married
</label>
<label for="recruit_profile_employee_profile_attributes_marital_status_type2" class="control-label radio-label">
<%= fe.radio_button :marital_status, "type2" %> Married
</label>
</div>
</div>
<!-- country code -->
<div class="form-group">
<%= fe.label :country_code, "Country Code", :class => "col-sm-2 control-label" %>
<div class="col-sm-1">
<%= fe.text_field :country_code, :class => "form-control" %>
</div>
</div>
<!-- phone number -->
<div class="form-group">
<%= fe.label :phone_number, "Phone Number", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field :phone_number, :class => "form-control" %>
</div>
</div>
<!-- employment status -->
<div class="form-group">
<label class="col-sm-2 control-label">Employment Status</label>
<div class="col-sm-8">
<label for="recruit_profile_employee_profile_attributes_employment_status_type1" class="control-label radio-label">
<%= fe.radio_button :employment_status, "type1" %> Un-Employed
</label>
<label for="recruit_profile_employee_profile_attributes_employment_status_type2" class="control-label radio-label">
<%= fe.radio_button :employment_status, "type2" %> Employed
</label>
</div>
</div>
<!-- Website -->
<div class="form-group">
<%= fe.label :website, "Website / Link", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field :website, :class => "form-control" %>
</div>
</div>
<div class="form-group">
<%= fe.label :avatar, "Avatar", :class => "col-sm-2 control-label" %>
<div class="controls">
<div class="fileupload fileupload-new clearfix <%= 'fileupload-edit' if !@profile.new_record? && @profile.employee_profile.avatar.file %>" data-provides="fileupload">
<div class="fileupload-new thumbnail pull-left">
<% if !@profile.new_record? && @profile.employee_profile.avatar.file %>
<%= image_tag @profile.employee_profile.avatar %>
<% else %>
<img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" />
<% end %>
</div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
<span class="btn btn-file">
<span class="fileupload-new"><%= t(:select_image) %></span>
<span class="fileupload-exists"><%= t(:change) %></span>
<%= fe.file_field :avatar %>
</span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
<div class="controls" data-toggle="buttons-checkbox">
<label class="checkbox inline btn btn-danger fileupload-remove">
<%= fe.check_box :remove_avatar %><%= t(:remove) %>
</label>
</div>
</div>
</div>
</div>
<% end %>
<ul class="nav nav-pills language-nav">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<li class="<%= 'active' if i == 0 %>">
<a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a>
</li>
<% end %>
</ul>
<!-- Language -->
<div class="tab-content language-area">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :employee_profile do |fe| %>
<!-- address -->
<%= fe.fields_for :address_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, "Address", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area locale, :class => "form-control", :value => @profile.employee_profile.address_translations[locale] %>
</div>
</div>
<% end %>
<!-- autobiography -->
<%= fe.fields_for :autobiography_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, "Autobiography", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area locale, :class => "form-control", :value => @profile.employee_profile.autobiography_translations[locale] %>
</div>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<%= f.hidden_field :pseudo_member_id, :value => current_pseudo_user.user_name %>
<%= f.hidden_field :email, :value => current_pseudo_user.email %>
<%= f.hidden_field :first_name, :value => current_pseudo_user.first_name %>
<%= f.hidden_field :last_name, :value => current_pseudo_user.last_name %>
<%= f.hidden_field :user_type, :value => "1" %>
<input type="hidden" name="step" value="step1" >
<%= f.submit "Save", :class =>"btn btn-primary" %>
<%= f.submit "Next", :class =>"btn btn-primary" %>
</div>
</div>