%= form_for([:admin, document], data: { style_form_errors: true }) do |form| %>
<% if document.errors.any? %>
<%= pluralize(document.errors.count, 'error') %> prohibited this document from being saved:
<% document.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= form.submit class: 'btn btn-primary' %>
<%= link_to 'Cancel', admin_documents_path, class: 'btn btn-secondary' %>
<% end %>
<%= javascript_include_tag 'https://cdn.ckeditor.com/4.8.0/standard/ckeditor.js' %>