Somente arquivos nos formatos jpeg, jpg, png, gif, pdf, odt, doc, docx, ods, xls, xlsx, odp, ppt, pptx, odg, xml, csv. Tamanho máximo por arquivo: 3MB
<% if f.object.errors[:observation_diary_record_attachments].present? %>
<%= f.object.errors[:observation_diary_record_attachments].join "
" %>
<% end %>
| Anexo |
<% if action_name != 'show' %>
|
<% end %>
<% if action_name == 'show' && f.object.observation_diary_record_attachments.blank? %>
| Nenhum documento anexado |
<% else %>
<%= f.simple_fields_for :observation_diary_record_attachments, f.object.observation_diary_record_attachments do |attachment| %>
<% if attachment.object.persisted? %>
<%= render 'observation_diary_record_attachment_show', f: attachment %>
<% else %>
<%= render 'observation_diary_record_attachment_fields', f: attachment %>
<% end %>
<% end %>
<% end %>
<% if action_name != 'show'%>
|
<%= link_to_add_association t('.add_attachment'), f, :observation_diary_record_attachments,
class: 'btn btn-success btn-sm',
:"data-association-insertion-method" => "append",
:"data-association-insertion-node" => "#observation-diary-record-attachments" %>
|
<% end %>