codeforamerica/michigan-benefits

View on GitHub
app/views/personal_detail/edit.html.erb

Summary

Maintainability
Test Coverage
<% content_for :header_title, "Personal Details" %>

<div class="form-card">
  <header class="form-card__header">
    <div class="form-card__title">
      First, tell us more about yourself.
    </div>
  </header>

  <div class="form-card__content">
    <%= form_for @step, as: :step, builder: MbFormBuilder, url: current_path, method: :put do |f| %>
      <%= f.mb_radio_set :sex,
        label_text: "What is your sex?",
        collection: [{ value: :male, label: "Male" }, { value: :female, label: "Female" }],
        help_text: " As it appears on your ID",
        layouts: ["inline"] %>
      <%= f.mb_select :marital_status,
        "What is your marital status?",
        Member::MARITAL_STATUSES,
        include_blank: "Choose one" %>
      <%= f.mb_input_field :ssn,
        "What is your Social Security Number?",
        type: :tel,
        options: { maxlength: 9 },
        help_text: "If you don’t have one or don’t want to answer now it’s okay to skip this",
        optional: true %>
      <p class="text--secure"><i class="illustration illustration--safety"></i><%= t("ssn.description") %></p>
    <%= render partial: "shared/next_step" %>
    <% end %>
  </div>
</div>