Merge remote-tracking branch 'upstream/pull/2042'
This commit is contained in:
commit
acfbc09198
3 changed files with 4 additions and 3 deletions
|
@ -33,7 +33,8 @@ class NoteComment < ActiveRecord::Base
|
||||||
validates :visible, :inclusion => [true, false]
|
validates :visible, :inclusion => [true, false]
|
||||||
validates :author, :associated => true
|
validates :author, :associated => true
|
||||||
validates :event, :inclusion => %w[opened closed reopened commented hidden]
|
validates :event, :inclusion => %w[opened closed reopened commented hidden]
|
||||||
validates :body, :format => /\A[^\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff]*\z/
|
validates :body, :allow_blank => false, :length => { :maximum => 2000 },
|
||||||
|
:format => /\A[^\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff]*\z/
|
||||||
|
|
||||||
# Return the comment text
|
# Return the comment text
|
||||||
def body
|
def body
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<form action="#">
|
<form action="#">
|
||||||
<input type="hidden" name="lon">
|
<input type="hidden" name="lon">
|
||||||
<input type="hidden" name="lat">
|
<input type="hidden" name="lat">
|
||||||
<textarea class="comment" name="text" cols="40" rows="10" placeholder="<%= t('javascripts.notes.new.advice') %>"></textarea>
|
<textarea class="comment" name="text" cols="40" rows="10" maxlength="2000" placeholder="<%= t('javascripts.notes.new.advice') %>"></textarea>
|
||||||
<div class="buttons clearfix">
|
<div class="buttons clearfix">
|
||||||
<input type="submit" name="add" value="<%= t('javascripts.notes.new.add') %>" disabled="1">
|
<input type="submit" name="add" value="<%= t('javascripts.notes.new.add') %>" disabled="1">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<% if @note.status == "open" %>
|
<% if @note.status == "open" %>
|
||||||
<form action="#">
|
<form action="#">
|
||||||
<textarea class="comment" name="text" cols="40" rows="5"></textarea>
|
<textarea class="comment" name="text" cols="40" rows="5" maxlength="2000"></textarea>
|
||||||
<div class="buttons clearfix">
|
<div class="buttons clearfix">
|
||||||
<% if current_user and current_user.moderator? -%>
|
<% if current_user and current_user.moderator? -%>
|
||||||
<input type="submit" name="hide" value="<%= t('javascripts.notes.show.hide') %>" class="deemphasize" data-note-id="<%= @note.id %>" data-method="DELETE" data-url="<%= note_url(@note, 'json') %>">
|
<input type="submit" name="hide" value="<%= t('javascripts.notes.show.hide') %>" class="deemphasize" data-note-id="<%= @note.id %>" data-method="DELETE" data-url="<%= note_url(@note, 'json') %>">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue