SpeciesFileGroup/taxonworks

View on GitHub
app/views/people/_form.html.erb

Summary

Maintainability
Test Coverage
<%= form_for(@person.metamorphosize) do |f| %>
    <%= render 'shared/errors', object: @person %>

    <div class="field">
      <%= f.label :type %><br>
      Unvetted <%= f.radio_button :type, 'Person::Unvetted', {:checked => true} %>
      Vetted <%= f.radio_button :type, 'Person::Vetted' %>
    </div>

    <%= render partial: 'form_elements', locals: {f: f} %>

    <% if @person.roles.count > 25 %>
      <p class="feedback feedback-warning">There are <%= @person.roles.count %> roles associated with this person. Cached value updates will happen in the background after edit.</p>
    <% end %>

    <div class="actions">
      <%= f.submit %>
    </div>
<% end %>