osu-cascades/ecotone-web

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

Summary

Maintainability
Test Coverage
.form
  = form_for(@fungi_sample, html: { multipart: true }) do |form|
    = form_errors_for(@fungi_sample)
    .content
      .caption
        %h3 Information 
        %p.italic Provide data about the fungi 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 :size
          = form.text_field :size, class: 'form-control', placeholder: 'mm'
        .data
          = form.label :description
          = form.text_area :description, class: 'form-control'
    = render 'layouts/image_gallery', {form: form, entity: @fungi_sample, phrase: 'Include reference pictures for the sample'}
    = render 'layouts/form_buttons', {form: form, text: 'Sample'}