<commit_before>{% load i18n extra_tags %}
{% load humanize %}
{% load sekizai_tags %}

{% addtoblock "css" %}
<link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}css/project_support/block/post_comments.css" />
{% endaddtoblock %}

<div class="comments" id="comments-for-{{post.post_type}}-{{post.id}}">
	<div class="content">
		<div id="add-comment-form" class="comment-form controls">
		      {% if request.user.is_anonymous%}               
               <label for="comment-text">{% trans 'Login to add your comment' %}</label>
               <textarea row="1" name="comment-text" id="comment-text" placeholder="{% trans 'Login to add your comment...' %}"></textarea>               
               <a class="submit" alt="you must login to comment" href="{{settings.LOGIN_URL}}?next={{request.get_full_path}}">
               {% trans 'Comment' %}
               </a>                            
            {% else %}
				   <label for="comment-text">{% trans 'Add your comment' %}</label>
				   <textarea row="1" name="comment-text" id="comment-text" placeholder="{% trans 'Add your comment...' %}"></textarea>
				   <input type="submit" class="submit" value="{% trans 'Comment' %}" />				
            {% endif %}
            <script>
            $(document).ready(function() {
            	askbot['data']['comments-for-{{post.post_type}}-{{post.id}}'] = {truncated: false};
            	$("#comments-for-{{post.post_type}}-{{post.id}} .comment-form input[type=submit]").click(function(){
                	var post_data = {
                            comment: $('#comments-for-{{post.post_type}}-{{post.id}} textarea').val(),
                            post_type : "{{post.post_type}}",
                            post_id : {{post.id}},
                            post_url : askbot['urls']['postComments'],
                            template_name : "project_support/block/comment.html",<commit_msg>disable comment text area when users are anonymous<commit_after>{% load i18n extra_tags %}
{% load humanize %}
{% load sekizai_tags %}

{% addtoblock "css" %}
<link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}css/project_support/block/post_comments.css" />
{% endaddtoblock %}

<div class="comments" id="comments-for-{{post.post_type}}-{{post.id}}">
	<div class="content">
		<div id="add-comment-form" class="comment-form controls">
		      {% if request.user.is_anonymous%}               
               <label for="comment-text">{% trans 'Login to add your comment' %}</label>
               <textarea disabled row="1" name="comment-text" id="comment-text" placeholder="{% trans 'Login to add your comment...' %}"></textarea>               
               <a class="submit" alt="you must login to comment" href="{{settings.LOGIN_URL}}?next={{request.get_full_path}}">
               {% trans 'Comment' %}
               </a>                            
            {% else %}
				   <label for="comment-text">{% trans 'Add your comment' %}</label>
				   <textarea row="1" name="comment-text" id="comment-text" placeholder="{% trans 'Add your comment...' %}"></textarea>
				   <input type="submit" class="submit" value="{% trans 'Comment' %}" />				
            {% endif %}
            <script>
            $(document).ready(function() {
            	askbot['data']['comments-for-{{post.post_type}}-{{post.id}}'] = {truncated: false};
            	$("#comments-for-{{post.post_type}}-{{post.id}} .comment-form input[type=submit]").click(function(){
                	var post_data = {
                            comment: $('#comments-for-{{post.post_type}}-{{post.id}} textarea').val(),
                            post_type : "{{post.post_type}}",
                            post_id : {{post.id}},
                            post_url : askbot['urls']['postComments'],
                            template_name : "project_support/block/comment.html",
{'fraction_non_alphanumeric': 0.18373648996397324, 'fraction_numerical': 0.002058672156459084, 'mean_word_length': 2.2418682235195995, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4442847', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1080, 'n_words': 219}