aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/templates/comments/preview.html
blob: cf493700759f19512596c3fae6b382d6216ff466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% extends "base.html" %}
{% load i18n %}

{% block title %}{% trans "Comment Submission" %}{% endblock %}

{% block content %}</div><div class='content' id='commentary'>
<br />
  {% load comments %}
  <form action="{% comment_form_target %}" method="post">
    {% if form.errors %}
   <h4>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h4>
    {% else %}
    <h4>{% trans "Preview your comment:" %}</h4>

<table class="comments">
{% if comment.person_name %}
<tr><td class="comment_info">
    Posted by <span class="comment_user">
    {% if comment.person_name %}{{ comment.person_name}}{% else %}anonymous{% endif %}</span><br />
    on <span class="comment_date">
    {{ comment.submit_date|date:"F j, Y" }}</span><br />
    at <span class="comment_time">{{ comment.submit_date|date:"H:i T" }}</span>
    </td><td class="comment_content">
    {% if comment.headline %}
    <span class="comment_headline">{{ comment.headline|escape|wordwrap:80 }}</span>
    <br />
    {% endif %}
    <span class="comment_content">{{ comment|escape|wordwrap:80 }}</span>
</td></tr>
{% else %}
<tr><td class="comment_info">
    Posted by <span class="comment_user">
    {% if comment.user.username %} {{ comment.user.username }}
    {% else %}{{ comment.user_name }} {% endif %}</span><br />
    on <span class="comment_date">
    {{ comment.submit_date|date:"F j, Y" }}</span><br />
    at <span class="comment_time">{{ comment.submit_date|date:"H:i" }}</span>
    </td><td class="comment_content">
    {% if comment.headline %}
    <span class="comment_headline">{{ comment.headline|escape|wordwrap:80 }}</span>
    <br />
    {% endif %}
    <span class="comment_content">{{ comment|escape|wordwrap:80 }}</span>
</td></tr>
{% endif %}
</table>



      <p>
      {% trans "and" %} <input type="submit" name="submit" class="submit-post" value="{% trans "Post your comment" %}" id="submit" /> {% trans "or make changes" %}:
      </p>
    {% endif %}
<table>
  {% for field in form %} {% if field.is_hidden %} {{ field }} {% else %}
    {% ifequal field.name "honeypot" %}
    <span style="display:none;">{{ field.label_tag }}{{ field }}</span> 
    {% else %}
<tr><td class="comment_field_name">
      <span {% if field.errors %} class="error"{% endif %}>
        {{ field.label_tag }}
        </span></td><td>{{ field }}
        {% if field.errors %}{{ field.errors }}{% endif %}
</td></tr> {% endifequal %} {% endif %} {% endfor %}
<tr><td class="comment_field_name"></td><td>
    <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" />
    <input type="submit" name="post" class="submit-post" value="{% trans "Post" %}" />
    <i>(no HTML or other markup)</i>
</td></tr>
</table>

{% endblock %}