<script>
window.CommentsConfig = {
	captcha_url:    "",
	post_url:       "{{ post_url }}",
	delete_url:     "{{ delete_url }}",
	edit_url:       "{{ edit_url }}",
	not_logged:     {{ not_logged     ? 'true' : 'false' }},
	use_captcha:    false,
	use_moderation: {{ use_moderation ? 'true' : 'false' }}
};
</script>
<script src="{{ home }}/engine/plugins/comments/js/comments.js"></script>

<div id="new_comments"></div>
<form id="comment" method="post" action="{{ post_url }}" name="form" {% if not noajax %}onsubmit="return add_comment();"{% endif %}>
<input type="hidden" name="newsid" value="{{ newsid }}" />
<input type="hidden" name="referer" value="{{ request_uri }}" />
<input type="hidden" name="module" value="{{ module|default('') }}" />
<div class="hidden-comment">
	<h3>{{ lang['comments:form.title']|default('Добавить комментарий') }}</h3>
	<div class="hidden-comment-form">
		<div class="add-comment">
			{% if not_logged %}
			<div class="add-comment-line">
				<div class="add-comment-line-left">
					{{ lang['comments:form.name']|default('Ваше Имя:') }}
				</div>
				<div class="add-comment-line-right">
					<input type="text" name="name" value="{{ savedname }}" class="form-input-stand" />
				</div>
			</div>
			<div class="add-comment-line">
				<div class="add-comment-line-left">
					{{ lang['comments:form.email']|default('Ваш E-Mail:') }}
				</div>
				<div class="add-comment-line-right">
					<input type="text" name="mail" value="{{ savedmail }}" class="form-input-stand" />
				</div>
			</div>
			{% endif %}
			<div class="add-comment-line" style="padding: 10px 0 10px 0;">
				<div class="bb-editor">{{ bbcodes|raw }}<textarea onkeypress="if(event.keyCode==10 || (event.ctrlKey && event.keyCode==13)) { return add_comment(); }" name="content" id="content"></textarea></div>
			</div>
			{% if captcha_widget %}
			<div class="add-comment-line">
				<div class="add-comment-line-left">
					{{ lang['comments:form.captcha']|default('Код:') }}
				</div>
				<div class="add-comment-line-right">
					{{ captcha_widget|raw }}
				</div>
			</div>
			{% endif %}
			<div class="add-comment-line">
				<input value="{{ lang['comments:form.submit']|default('Добавить') }}" type="image" src="{{ tpl_url }}/images/add-buttom.jpg"  style="border: 0;" />
			</div>
		</div>
	</div>
</div>
<div style="clear: both;height: 20px;"></div>
</form>
<div id="new_comments_rev"></div>
