notebook/app/views/content/_form.html.erb
2017-02-23 17:56:07 +00:00

19 lines
720 B
Plaintext

<div style="padding: 35px 20px;">
<%= render 'content/form/errors', content: content %>
<%# Content panels %>
<% content.class.attribute_categories(current_user).each do |category| %>
<%= render 'content/form/panel', category: category, f: f, content: content %>
<% end %>
</div>
<div class="card-action center grey-text">
Tip: You don't need to save before changing categories (on the right). Just remember to save when you're done!
</div>
<script type="text/javascript">
// Dunno why the framework isn't applying the invalid class automatically, but lets just add it manually for now.
$(document).ready(function () {
$('.field_with_errors').find('textarea, input').addClass('invalid');
});
</script>