diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dc1080b8a..3447b3306 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -227,6 +227,7 @@ module ApplicationHelper options[:value] ||= instance_variable_get("@#{object}").try(name) options[:preview_id] ||= "dtext-preview" options[:classes] ||= "" + options[:hint] ||= "" options[:type] ||= "text" render "dtext/form", options diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 300795e97..fbf255f5e 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -4,7 +4,7 @@ <% if comment.new_record? %> <%= f.hidden_field :post_id %> <% end %> - <%= dtext_field "comment", "body", :classes => "autocomplete-mentions", :value => comment.body, :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %> + <%= dtext_field "comment", "body", classes: "autocomplete-mentions", value: comment.body, input_id: "comment_body_for_#{comment.id}", preview_id: "dtext-preview-for-#{comment.id}", hint: link_to_wiki("Comment rules", "howto:comment").html_safe %> <%= f.button :submit, "Submit" %> <%= dtext_preview_button "comment", "body", :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %> <% if comment.new_record? %> diff --git a/app/views/comments/_index_by_post.html.erb b/app/views/comments/_index_by_post.html.erb index 29acbe032..549d17557 100644 --- a/app/views/comments/_index_by_post.html.erb +++ b/app/views/comments/_index_by_post.html.erb @@ -1,10 +1,4 @@
Before commenting, read the <%= link_to_wiki "how to comment guide", "howto:comment" %>.
- <% end %> <%= render "comments/partials/index/list", comments: @comments, post: @post, page: :post %>