File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010%>
1111
1212<%
13+ # TODO: make configurable
14+ min_chars = 15
15+ max_chars = 1000
16+
1317 can_comment = user.can_reply_to?(thread)
1418 is_rate_limited, rate_limit_message = comment_rate_limited?(user, post, create_audit_log: false)
1519 text ||= defined?(text) && text.present? ? text : t('comments.labels.reply_to_thread')
4650 <%= label_tag :content , 'Your message' , class : 'form-element' %>
4751 <%= text_area_tag :content , '' ,
4852 class : 'form-element js-comment-field' ,
53+ minlength : min_chars ,
54+ maxlength : max_chars ,
55+ required : true ,
4956 data : { thread : thread . id ,
5057 post : thread . post_id ,
5158 character_count : ".js-character-count-#{ post . id } " } %>
52- <%= render 'shared/char_count' , type : post . id , min : 15 , max : 1000 %>
59+ <%= render 'shared/char_count' , type : post . id , min : min_chars , max : max_chars %>
5360 <%= submit_tag 'Add reply' , class : 'button is-muted is-filled' , disabled :true %>
5461 <% end %>
5562<% end %>
You can’t perform that action at this time.
0 commit comments