<%= form_for([:admin, document], data: { style_form_errors: true }) do |form| %> <% if document.errors.any? %> <% end %>
<%= form.label :slug, class: 'col-form-label' %>
<%= form.text_field :slug, class: 'form-control', placeholder: 'terms-and-conditions' %> <%= "Slugs are used to create your documents url. For example: https://www.website.com#{attorney_mounted_path}/terms-and-conditions" %>

<%= form.label :published, 'Publish', class: 'col-form-label' %>
<%= form.check_box :published %> <%= "The document won't be visible until you publish it" %>

<%= form.label :content, class: 'col-2 col-form-label' %>
<%= form.text_area :content, class: 'form-control', data: { 'rich-editor' => true } %>
<%= 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' %>