<%= ts("Note: Text entered in the posting form is not automatically saved. Always keep a backup copy of your work.").html_safe %>
<% use_tinymce %>
<%= ts("Work Text") %>*
<%= c.text_area :content, value: @chapter.content,
class: "mce-editor observe_textlength large", id: "content" %>
<%= live_validation_for_field("content",
maximum_length: ArchiveConfig.CONTENT_MAX_DISPLAYED,
minimum_length: ArchiveConfig.CONTENT_MIN,
tooLongMessage: ts("We salute your ambition! But sadly the content must be less than %{max} characters long. (Maybe you want to create a multi-chaptered work?)",
max: ArchiveConfig.CONTENT_MAX_DISPLAYED.to_s),
tooShortMessage: ts("Brevity is the soul of wit, but your content does have to be at least %{min} characters long.",
min: ArchiveConfig.CONTENT_MIN.to_s),
failureMessage: ts("Brevity is the soul of wit, but your content does have to be at least %{min} characters long.",
min: ArchiveConfig.CONTENT_MIN.to_s))
%>
<%= generate_countdown_html("content", ArchiveConfig.CONTENT_MAX_DISPLAYED) %>
<% end %>
<%= content_for :footer_js do %>
<%= javascript_tag do %>
$j(document).ready(function(){
$j(".toggle_formfield").click(function() {
var targetId = $j(this).attr("id").replace("-show", "");
toggleFormField(targetId);
});
})
<% end %>
<% end %>