Skip to content

Commit

Permalink
Merge pull request #1573 from LadyOscar/issue_3227
Browse files Browse the repository at this point in the history
Issue 3227: Secretly allow more characters in Support Form summary
  • Loading branch information
zz9pzza committed Jun 21, 2014
2 parents 6cb8afd + dce8fe8 commit aec9113
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/models/feedback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class Feedback < ActiveRecord::Base
validates_presence_of :summary
validates :email, :email_veracity => {:allow_blank => true}
validates_length_of :summary, :maximum => ArchiveConfig.FEEDBACK_SUMMARY_MAX,
:too_long => ts("must be less than %{max} characters long.", :max => ArchiveConfig.FEEDBACK_SUMMARY_MAX)

:too_long => ts("must be less than %{max} characters long.", :max => ArchiveConfig.FEEDBACK_SUMMARY_MAX_DISPLAYED)

validate :check_for_spam
def check_for_spam
Expand Down
4 changes: 2 additions & 2 deletions app/views/feedbacks/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<dt class="required"><%= f.label :summary, "Brief summary (required)" %>: </dt>
<dd>
<%= f.text_field :summary, :size => 60, :class => "observe_textlength" %>
<%= generate_countdown_html("feedback_summary", ArchiveConfig.FEEDBACK_SUMMARY_MAX) %>
<%= generate_countdown_html("feedback_summary", ArchiveConfig.FEEDBACK_SUMMARY_MAX_DISPLAYED) %>
<p>
<%= live_validation_for_field('feedback_summary', :failureMessage => ts("Please enter a brief summary of your message")) %>
</p>
Expand All @@ -71,4 +71,4 @@
</fieldset>

<% end %>
<!--/content-->
<!--/content-->
3 changes: 2 additions & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ CONTENT_MAX: 510000
CONTENT_MAX_DISPLAYED: 500000
LOGNOTE_MIN: 5
LOGNOTE_MAX: 1250
FEEDBACK_SUMMARY_MAX: 100
FEEDBACK_SUMMARY_MAX_DISPLAYED: 100
FEEDBACK_SUMMARY_MAX: 107
INFO_MAX: 100000
FAQ_MAX: 200000
ICON_ALT_MAX: 250
Expand Down

0 comments on commit aec9113

Please sign in to comment.