osu-cascades/ecotone-web

View on GitHub
app/views/macroinvertebrate_samples/_form.html.haml

Summary

Maintainability
Test Coverage
.form
  = form_for(@macroinvertebrate_sample, html: { multipart: true }) do |form|
    = form_errors_for(@macroinvertebrate_sample)
    .content
      .caption
        %h3 Information 
        %p.italic Provide data about the macroinvertebrate sample
      .input
        .data
          = form.label :collected_on, 'Collection Date'
          = form.date_field :collected_on, class: 'form-control'
        .data
          = form.label :plot_id, 'Plot'
          = form.collection_select :plot_id, @plots, :id, :name, {include_blank: 'Choose plot...'}, {class: 'form-control'}
        .data
          = form.label :location_within_plot, 'Location in Plot'
          = form.text_field :location_within_plot, class: 'form-control'
        .data
          = form.label :phylum
          = form.text_field :phylum, class: 'form-control'
        .data
          = form.label :quantity
          = form.text_field :quantity, class: 'form-control'
        .data
          = form.label :ecosystem_service
          = form.select(:ecosystem_service, MacroinvertebrateSample::ECOSYSTEM_SERVICES, {include_blank: 'Choose service...'}, {class: 'form-control'})
    = render 'layouts/image_gallery', {form: form, entity: @macroinvertebrate_sample, phrase: 'Include reference pictures for the sample'}
    = render 'layouts/form_buttons', {form: form, text: 'Sample'}