40 lines
2.3 KiB
Twig
40 lines
2.3 KiB
Twig
<form id="add_comment" action="{{ self_url() }}" method="post" accept-charset="UTF-8">
|
|
{% if visitor.logged_in %}
|
|
<label for="comment_body_field">{{ "%s's comment" | translate | format(visitor.full_name | oneof(visitor.login)) }}</label>
|
|
{% else %}
|
|
<label for="comment_author_field">{{ "Your name" | translate }}</label>
|
|
<input type="text" name="author" value="{{ posted('author') | fix(true) }}" id="comment_author_field" class="text" maxlength="250">
|
|
<label for="comment_author_email_field">{{ "Your email" | translate }}</label>
|
|
<input type="email" name="author_email" value="{{ posted('author_email') | fix(true) }}" id="comment_author_email_field" class="text" maxlength="128">
|
|
<label for="comment_author_url_field">{{ "Your website" | translate }}</label>
|
|
<input type="url" name="author_url" value="{{ posted('author_url') | fix(true) }}" id="comment_author_url_field" class="text" maxlength="2048">
|
|
{{ generate_captcha() }}
|
|
<label for="comment_body_field">{{ "Your comment" | translate }}</label>
|
|
{% endif %}
|
|
<textarea name="body" id="comment_body_field">{{ posted("body") | fix(false, true) }}</textarea>
|
|
<small>
|
|
{% if site.enable_markdown %}{{ "Markdown is allowed." | translate }} {% endif %}
|
|
{% if site.module_comments.allowed_comment_html is not empty %}
|
|
{{ "HTML tags allowed:" | translate }} {{ "<%s>." | format(site.module_comments.allowed_comment_html | join(">, <") | fix ) }}
|
|
{% else %}
|
|
{{ "HTML is not allowed." | translate }}
|
|
{% endif %}
|
|
</small>
|
|
{% if visitor.logged_in and site.email_correspondence %}
|
|
<label for="comment_notify_field">{{ "Notify me when others comment" | translate }}</label>
|
|
<input type="checkbox" name="notify" id="comment_notify_field">
|
|
{% endif %}
|
|
<div class="doaction speak">
|
|
{% if visitor.logged_in %}
|
|
<input type="hidden" name="author" value="{{ visitor.full_name | oneof(visitor.login) | fix(true) }}">
|
|
<input type="hidden" name="author_email" value="{{ visitor.email | fix(true) }}">
|
|
<input type="hidden" name="author_url" value="{{ visitor.website | fix(true) }}">
|
|
{% endif %}
|
|
<input type="hidden" name="parent_id" value="0">
|
|
<input type="hidden" name="post_id" value="{{ post.id }}">
|
|
<input type="hidden" name="hash" value="{{ authenticate() }}">
|
|
<input type="hidden" name="action" value="add_comment">
|
|
<button type="submit">{{ "Speak" | translate }}</button>
|
|
</div>
|
|
</form>
|