ministryofjustice/Claim-for-Crown-Court-Defence

View on GitHub
app/views/external_users/claims/defendants/_fields.html.haml

Summary

Maintainability
Test Coverage
.defendants.fx-numberedList-hook{ id: @claim.form_step }

  %h2.govuk-heading-l
    = t('.page_heading')

  = f.fields_for :defendants do |defendant|
    = render partial: 'external_users/claims/defendants/defendant_fields', locals: { f: defendant }

.form-actions.defendants-actions
  %hr.govuk-section-break.govuk-section-break--l.govuk-section-break--visible
  = link_to_add_association t('.add_another_defendant'), f, :defendants, partial: 'external_users/claims/defendants/defendant_fields', class: 'govuk-button govuk-button--secondary', render_options: { }, data: { 'association-insertion-method': 'append', 'association-insertion-node': '.fx-numberedList-hook', module: 'govuk-button' }, role: 'button', draggable: 'false'