mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Bug fixed: comments in results have no error message if the text exceeds 1000 characters.
This commit is contained in:
parent
ed72996523
commit
15ea8fc0dc
2 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ class ResultCommentsController < ApplicationController
|
|||
format.html { render :new }
|
||||
format.json {
|
||||
render json: {
|
||||
errors: @comment.errors
|
||||
errors: @comment.errors.to_hash(true)
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<li>
|
||||
<hr>
|
||||
<%= bootstrap_form_for :comment, url: { format: :json }, method: :post, remote: true do |f| %>
|
||||
<%= f.text_field :message, hide_label: true, placeholder: t("general.comment_placeholder"), append: f.submit("+", onclick: "processResult(event, ResultTypeEnum.COMMENT, false);"), help: '.' %>
|
||||
<%= f.text_field :message, hide_label: true, placeholder: t("general.comment_placeholder"), append: f.submit("+"), help: '.' %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue