sgmap/boussole

View on GitHub
app/views/housings/steps/housing.html.haml

Summary

Maintainability
Test Coverage
-# coding: utf-8

.l-container-narrow
  .l-content
    %article.wizard-form
      %h1.wizard-form-header Ta recherche
      %hr

      = simple_form_for(@housing, url: wizard_path, method: :put, wrapper: :vertical_form) do |f|
        = f.error_notification

        = f.input :duration,
                  include_blank: false,
                  prompt: 'Sélectionne une option',
                  collection: HOUSING_DURATIONS,
                  label_method: :to_s,
                  value_method: :to_s,
                  as: :select

        = f.input :housing_city,
                  collection: CITIES[rhizome.()],
                  include_blank: false,
                  input_html: { rel: 'autocomplete' }

        = f.input :resources do
          .input-group
            = f.input_field :resources, class: 'form-control'
            %span.input-group-addon €

        = render(partial: 'blocks/button_groups/wizard_first_step')