BathHacked/energy-sparks

View on GitHub
app/views/schools/consent_documents/_form.html.erb

Summary

Maintainability
Test Coverage
<%= simple_form_for [school, consent_document] do |f| %>

  <% if consent_document.new_record? %>
    <%= f.input :title, as: :hidden %>
  <% else %>
    <div class="form-group">
      <%= f.label t('consent_documents.document_title') %>
      <%= f.text_field :title, class: 'form-control' %>
    </div>
    <div class="form-group">
      <%= f.label t('consent_documents.document_description'), for: :description %>
      <%= f.rich_text_area :description %>
    </div>
  <% end %>

  <div class="form-group">
    <%= f.input :file %>
  </div>

  <div class="actions">
    <%= f.submit label, class: 'btn btn-primary' %>
  </div>
<% end %>