Skip to content

Commit

Permalink
Merge pull request #573 from elzj/issue-2999-content-max
Browse files Browse the repository at this point in the history
Issue 2999: Increase max chapter length
  • Loading branch information
neuroalien committed Apr 14, 2012
2 parents 278ba23 + 852c048 commit 1b3d4a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/views/chapters/_chapter_form.html.erb
Expand Up @@ -84,13 +84,13 @@
<div class="rtf-html-field">
<%= f.text_area :content, :class => "mce-editor", :id => "content", :class => "observe_textlength large" %>
<%= live_validation_for_field('content',
:maximum_length => ArchiveConfig.CONTENT_MAX,
: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.to_s),
: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) %>
<%= generate_countdown_html("content", ArchiveConfig.CONTENT_MAX_DISPLAYED) %>
</div>
</fieldset>

Expand Down
6 changes: 3 additions & 3 deletions app/views/works/_standard_form.html.erb
Expand Up @@ -267,13 +267,13 @@
<h4 class="landmark heading"><%= ts('Work Text *') %></h4>
<%= 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, :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.to_s),
: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) %>
<%= generate_countdown_html("content", ArchiveConfig.CONTENT_MAX_DISPLAYED) %>
</div>
</fieldset>
<% end %>
Expand Down
3 changes: 2 additions & 1 deletion config/config.yml
Expand Up @@ -74,7 +74,8 @@ NOTES_MAX: 5000
COMMENT_MAX: 4300
TAG_MAX: 100
CONTENT_MIN: 10
CONTENT_MAX: 500000
CONTENT_MAX: 510000
CONTENT_MAX_DISPLAYED: 500000
LOGNOTE_MIN: 5
LOGNOTE_MAX: 1250
FEEDBACK_SUMMARY_MAX: 100
Expand Down

0 comments on commit 1b3d4a2

Please sign in to comment.