TechLadies/home-web

View on GitHub
app/views/cases/_worker_domestic.html.erb

Summary

Maintainability
Test Coverage
<legend>Information for Domestic Workers</legend>

<div class="row">
  <%= ff.input :arrived_at, label: 'Date of Arrival to HOME', as: :string, input_html: { class: 'datepicker' }, wrapper_html: { class: "col-md-4" } %>
  <%= ff.input :interview_conducted_by, wrapper_html: { class: "col-md-4" } %>
  <%= ff.input :date_of_interview, as: :string, input_html: { class: 'datepicker' }, wrapper_html: { class: "col-md-4" } %>
</div>

<div class="row">
  <hr />
  <div class='col-md-8'>
    <div class="row">
      <%= ff.input :translate_to, label: 'Preferred Language (only if translation is required)', wrapper_html: { class: "col-md-12" } %>
      <%= ff.input :transfer_required, label: 'Transfer Requested', as: :boolean, checked_value: true, unchecked_value: false, wrapper_html: { class: "col-md-6" } %>
      <%= ff.input :repatriation_required, label: 'Repatriation Requested', placeholder: 'For e.g. Indonesia', wrapper_html: { class: "col-md-6" } %>
    </div>
  </div>
  <div class='col-md-4'>
    <%= ff.input :english_proficiency, as: :radio_buttons, collection: [['Poor', :poor], ['Basic', :basic], ['Intermediate', :intermediate], ['Advanced', :advanced]] %>
  </div>
</div>

<div class="row">
  <hr />
  <div class='col-md-8'>
    <div class="row">
      <%= ff.input :loan_value, label: 'Loan Value (in SGD)', wrapper_html: { class: "col-md-6" } %>
      <%= ff.input :remaining_loan_value, label: 'Remaining Loan Value (in SGD)', wrapper_html: { class: "col-md-6" } %>
      <%= ff.input :salary_details, wrapper_html: { class: "col-md-12" }, input_html: { rows: 5 } %>
    </div>
  </div>
  <div class='col-md-4'>
    <%= ff.input :sleeping_area, as: :check_boxes, collection: DomesticWorker::SLEEPING_AREAS.collect { |k, v| [v, k] } , multiple: true %>
  </div>
</div>