<%= f.label :documents, t("documents.form.title") %>
<%= documentables_note(documentable) %>
<%= f.fields_for :documents do |documents_builder| %>
<%= render 'documents/document_fields', f: documents_builder %>
<% end %>
<%= link_to_add_association t('documents.form.add_new_document'), f, :documents,
partial: "documents/document_fields",
id: "new_document_link",
class: "button hollow #{"hide" if documentable.documents.count >= documentable.class.max_documents_allowed}",
data: {
association_insertion_node: "#nested-documents",
association_insertion_method: "append"
} %>
">
<%= t "documents.max_documents_allowed_reached_html" %>