smc/grandham

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

Summary

Maintainability
Test Coverage
= simple_form_for @library, html: { class: 'form-horizontal' }, multipart: true do |f|
  %fieldset
    %legend= 'Edit Library'

  = f.input :name, as: :string, input_html: { class: 'input-xxlarge' }
  = f.input :place, as: :string, input_html: { class: 'input-xxlarge' }

  = f.fields_for :logos do |logo_form|
    .control-group
      = logo_form.label :image, 'Logo', class: 'control-label'
      .controls
        = logo_form.file_field :image

  .form-actions
    = f.submit 'Submit', class: 'btn btn-primary'
    = link_to 'Cancel', language_library_path(@library.language, @library), class: 'btn'