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

251 lines
9.2 KiB
Plaintext
Raw Normal View History

2017-12-21 19:41:50 +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-fileupload" %>
<%= javascript_include_tag "lib/file-type" %>
<%# 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" : '' %>">
<!-- Job Title -->
<%= f.fields_for :job_title_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, "Job Title", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field locale, :class => "form-control", :value => @job.job_title_translations[locale] %>
</div>
</div>
<% end %>
<!-- Job Description -->
<%= f.fields_for :job_description_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, "Job Description", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area locale, :class => "form-control", :value => @job.job_description_translations[locale] %>
</div>
</div>
<% end %>
<!-- Responsibility -->
<%= f.fields_for :responsibility_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, "Job Responsibility", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area locale, :class => "form-control", :value => @job.responsibility_translations[locale] %>
</div>
</div>
<% end %>
<!-- Other Conditions -->
<%= f.fields_for :other_conditions_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, "Other Conditions", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area locale, :class => "form-control", :value => @job.other_conditions_translations[locale] %>
</div>
</div>
<% end %>
</div>
<% end %>
<hr>
<!-- Job Category -->
<div class="form-group">
<%= f.label :category, "Category", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.select :category, RecruitmentCategory.all.collect{|rc| [rc.job_category,rc.id.to_s]}, {:include_blank => "Select Category"},{:class => "form-control"} %>
</div>
</div>
2017-12-21 19:41:50 +00:00
<!-- salary type -->
<div class="form-group">
<label class="col-sm-2 control-label">Salary</label>
<div class="col-sm-8">
<label for="recruitment_job_salary_type1" class="control-label radio-label">
<%= f.radio_button :salary, "type1" %> Negotiable
</label>
<label for="recruitment_job_salary_type2" class="control-label radio-label">
<%= f.radio_button :salary, "type2" %> According to Company Rules
</label>
<label for="recruitment_job_salary_type3" class="control-label radio-label">
<%= f.radio_button :salary, "type3" %> Monthly Salary
</label>
</div>
</div>
<!-- location of work -->
<div class="form-group">
<%= f.label :location_of_work, "Location of Work", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_field :location_of_work, :class => "form-control"%>
</div>
</div>
<!-- Industrial area -->
<div class="form-group">
<%= f.label :industrial_area, "Industrial Area", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_field :industrial_area, :class => "form-control"%>
</div>
</div>
<!-- travel assignment type -->
<div class="form-group">
<label class="col-sm-2 control-label">Travel Assignment</label>
<div class="col-sm-8">
<label for="recruitment_job_travel_assignment_type1" class="control-label radio-label">
<%= f.radio_button :travel_assignment, "type1" %> Need to Travel
</label>
<label for="recruitment_job_travel_assignment_type2" class="control-label radio-label">
<%= f.radio_button :travel_assignment, "type2" %> Occasionally
</label>
<label for="recruitment_job_travel_assignment_type3" class="control-label radio-label">
<%= f.radio_button :travel_assignment, "type3" %> Travelling not required
</label>
</div>
</div>
<!-- Working Hours -->
<div class="form-group">
<label class="col-sm-2 control-label">Working Hours</label>
<div class="col-sm-8">
<label for="recruitment_job_working_time_type1" class="control-label radio-label">
<%= f.radio_button :working_time, "type1" %> Day Shift
</label>
<label for="recruitment_job_working_time_type2" class="control-label radio-label">
<%= f.radio_button :working_time, "type2" %> Night Shift
</label>
</div>
</div>
<!-- Holidays -->
<div class="form-group">
<label class="col-sm-2 control-label">Holidays</label>
<div class="col-sm-8">
<label for="recruitment_job_holiday_system_type1" class="control-label radio-label">
<%= f.radio_button :holiday_system, "type1" %> According to Company Rules
</label>
<label for="recruitment_job_holiday_system_type2" class="control-label radio-label">
<%= f.radio_button :holiday_system, "type2" %> Others
<%= f.text_field :holiday_system_other, :disabled => true %>
</label>
</div>
</div>
<!-- Joining Day -->
<div class="form-group">
<label class="col-sm-2 control-label">Joining Time</label>
<div class="col-sm-8">
<label for="recruitment_job_joining_time_type1" class="control-label radio-label">
<%= f.radio_button :joining_time, "type1" %> Immediate
</label>
<label for="recruitment_job_joining_time_type2" class="control-label radio-label">
<%= f.radio_button :joining_time, "type2" %> Within a week
</label>
<label for="recruitment_job_joining_time_type3" class="control-label radio-label">
<%= f.radio_button :joining_time, "type3" %> Within a month
</label>
<label for="recruitment_job_joining_time_type4" class="control-label radio-label">
<%= f.radio_button :joining_time, "type4" %> More than a month
</label>
</div>
</div>
<hr>
<!-- Work Type -->
<div class="form-group">
<label class="col-sm-2 control-label">Work Type</label>
<div class="col-sm-8">
<label for="recruitment_job_work_type_type1" class="control-label radio-label">
<%= f.radio_button :work_type, "type1" %> Office Worker
</label>
<label for="recruitment_job_work_type_type2" class="control-label radio-label">
<%= f.radio_button :work_type, "type2" %> Graduate
</label>
<label for="recruitment_job_work_type_type3" class="control-label radio-label">
<%= f.radio_button :work_type, "type3" %> Foreigner
</label>
<label for="recruitment_job_work_type_type4" class="control-label radio-label">
<%= f.radio_button :work_type, "type4" %> Internship
</label>
<label for="recruitment_job_work_type_type5" class="control-label radio-label">
<%= f.radio_button :work_type, "type5" %> SOHO
</label>
</div>
</div>
<!-- Work Experience -->
<div class="form-group">
<%= f.label :work_experience_years, "Work Experience", :class => "col-sm-2 control-label" %>
<div class="col-sm-7">
<label for="recruitment_job_work_experience_years">
<%= f.number_field :work_experience_years, :class => "col-sm-3", :max => 50, :min => 0, :value => 0 %> Years
</label>
<label for="recruitment_job_work_experience_months">
<%= f.number_field :work_experience_months, :class => "col-sm-3", :max => 11, :min => 0, :value => 0 %> Months
</label>
</div>
</div>
<!-- Academic Req -->
<div class="form-group">
<%= f.label :academic_requirement, "Academic Requirement", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_area :academic_requirement, :class => "form-control"%>
</div>
</div>
<!-- Language Req -->
<div class="form-group">
<%= f.label :language_requirement, "Language Requirement", :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_field :language_requirement, :class => "form-control", :placeholder => "Seperate with (,) ex; English, Chinese" %>
</div>
</div>
<!-- Tools Req -->
<div class="form-group">
<%= f.label :tools_requirement, "Skills", :class => "col-sm-2 control-label" %>
2017-12-21 19:41:50 +00:00
<div class="col-sm-5">
<%= f.text_field :skills, :class => "form-control", :placeholder => "Seperate with (,) ex; Word, Excel", :value => @job.skills.join(", ") %>
2017-12-21 19:41:50 +00:00
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<%= f.hidden_field :employer_profile_id, :value => @profile.profile.id %>
<%= f.submit "Submit", :class =>"btn btn-primary" %>
<a href="<%= mydashboard_path %>" class="btn btn-default">Cancel</a>
2017-12-21 19:41:50 +00:00
</div>
</div>
<script type="text/javascript">
$("#recruitment_job_holiday_system_type2").on("click",function(){
if($(this).is(":checked")){
$("#recruitment_job_holiday_system_other").prop("disabled",false);
$("#recruitment_job_holiday_system_other").focus();
}
})
$("#recruitment_job_holiday_system_type1").on("click",function(){
$("#recruitment_job_holiday_system_other").prop("disabled",true).val("");
})
</script>