aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/templates/comments
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django/templates/comments')
-rw-r--r--bn_django/templates/comments/form.html14
-rw-r--r--bn_django/templates/comments/free_preview.html46
-rw-r--r--bn_django/templates/comments/freeform.html7
-rw-r--r--bn_django/templates/comments/posted.html13
-rw-r--r--bn_django/templates/comments/preview.html46
5 files changed, 115 insertions, 11 deletions
diff --git a/bn_django/templates/comments/form.html b/bn_django/templates/comments/form.html
index 403dd2b..a2af1be 100644
--- a/bn_django/templates/comments/form.html
+++ b/bn_django/templates/comments/form.html
@@ -1,11 +1,14 @@
{% load i18n %}
<form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="/comments/post/" method="post">
+<p><textarea name="comment" id="id_comment"></textarea></p>
+<input class="submit" type="submit" name="preview" value="{% trans "Preview comment" %}" />
{% if user.is_authenticated %}
-<p>{% trans "Username:" %} <strong>{{ user.username }}</strong> (<a href="/accounts/logout/">{% trans "Log out" %}</a>)</p>
+<p>&nbsp;{% trans "Username:" %} <strong>{{ user.username }}</strong> (<a href="/accounts/logout/">{% trans "Log out" %}</a>)
{% else %}
-<p><label for="id_username">{% trans "Username:" %}</label> <input type="text" name="username" id="id_username" /><br />{% trans "Password:" %} <input type="password" name="password" id="id_password" /> (<a href="/accounts/password_reset/">{% trans "Forgotten your password?" %}</a>)</p>
+<p><label for="id_username">{% trans "Username:" %}</label> <input type="text" name="username" id="id_username" /><br />{% trans "Password:" %} <input type="password" name="password" id="id_password" /> (<a href="/accounts/password_reset/">{% trans "Forgotten your password?" %}</a>)
{% endif %}
+</p>
{% if ratings_optional or ratings_required %}
<p>{% trans "Ratings" %} ({% if ratings_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):</p>
@@ -24,13 +27,10 @@
<input type="hidden" name="photo_options" value="{{ photo_options }}" />
{% endif %}
-<p><label for="id_comment">{% trans "Comment:" %}</label><br />
-<textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
<p>
<input type="hidden" name="options" value="{{ options }}" />
-<input type="hidden" name="target" value="{{ target }}{{object.type}}:{{object.id}}" />
-<input type="hidden" name="gonzo" value="{{ hash }}asdf" />
-<input type="submit" name="preview" value="{% trans "Preview comment" %}" />
+<input type="hidden" name="target" value="{{ target }}" />
+<input type="hidden" name="gonzo" value="{{ hash }}" />
</p>
</form>
diff --git a/bn_django/templates/comments/free_preview.html b/bn_django/templates/comments/free_preview.html
new file mode 100644
index 0000000..3c212c0
--- /dev/null
+++ b/bn_django/templates/comments/free_preview.html
@@ -0,0 +1,46 @@
+{% extends "base.html" %}
+
+
+{% block title %}Preview your comment{% endblock %}
+
+{% block content %}
+
+<form action="../postfree/" method="post">
+ {% if comment_form.has_errors %}
+ <p><strong style="color: red;">Please correct the following errors.</strong></p>
+ {% else %}
+ <div class="comment">
+ {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
+ <p class="date small">Posted by <strong>{{ comment.person_name }}</strong></p>
+ </div>
+
+ <p><input type="submit" name="post" value="Post public comment" /></p>
+
+ <h1>Or edit it again</h1>
+ {% endif %}
+
+ {% if comment_form.person_name.errors %}
+ {{ comment_form.person_name.html_error_list }}
+ {% endif %}
+
+ <p><label for="id_person_name">Your name:</label> {{ comment_form.person_name }}</p>
+
+ {% if comment_form.comment.errors %}
+ {{ comment_form.comment.error_list }}
+ {% endif %}
+
+ <p>
+ <label for="id_comment">Comment:</label>
+ <br />
+ {{ comment_form.comment }}
+ </p>
+
+ <input type="hidden" name="options" value="{{ options }}" />
+ <input type="hidden" name="target" value="{{ target }}" />
+ <input type="hidden" name="gonzo" value="{{ hash }}" />
+
+ <p>
+ <input type="submit" name="preview" value="Preview revised comment" />
+ </p>
+</form>
+{% endblock %}
diff --git a/bn_django/templates/comments/freeform.html b/bn_django/templates/comments/freeform.html
index 95e5153..3d3678e 100644
--- a/bn_django/templates/comments/freeform.html
+++ b/bn_django/templates/comments/freeform.html
@@ -1,11 +1,10 @@
{% load i18n %}
<form action="/comments/postfree/" method="post">
-<p><label for="id_person_name">{% trans "Your name:" %}</label> <input type="text" id="id_person_name" name="person_name" /></p>
-<p><label for="id_comment">{% trans "Comment:" %}</label><br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
-<p>
+<p><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
+<input class="submit" type="submit" name="preview" value="{% trans "Preview comment" %}" />
+<p>&nbsp;<label for="id_person_name">{% trans "Your name:" %}</label> <input type="text" id="id_person_name" name="person_name" />
<input type="hidden" name="options" value="{{ options }}" />
<input type="hidden" name="target" value="{{ target }}" />
<input type="hidden" name="gonzo" value="{{ hash }}" />
-<input type="submit" name="preview" value="{% trans "Preview comment" %}" />
</p>
</form>
diff --git a/bn_django/templates/comments/posted.html b/bn_django/templates/comments/posted.html
new file mode 100644
index 0000000..07bdb67
--- /dev/null
+++ b/bn_django/templates/comments/posted.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block title %}Comment posted successfully{% endblock %}
+
+{% block content %}
+<p>Thanks for contributing.</p>
+
+{% if object %}
+ <ul>
+ <li><a href="{{ object.get_absolute_url }}">View your comment</a></li>
+ </ul>
+{% endif %}
+{% endblock %}
diff --git a/bn_django/templates/comments/preview.html b/bn_django/templates/comments/preview.html
new file mode 100644
index 0000000..052b373
--- /dev/null
+++ b/bn_django/templates/comments/preview.html
@@ -0,0 +1,46 @@
+{% extends "base.html" %}
+
+
+{% block title %}Preview your comment{% endblock %}
+
+{% block content %}
+
+<form action="../post/" method="post">
+ {% if comment_form.has_errors %}
+ <p><strong style="color: red;">Please correct the following errors.</strong></p>
+ {% else %}
+ <div class="comment">
+ {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
+ <p class="date small">Posted by <strong>{{ comment.person_name }}</strong></p>
+ </div>
+
+ <p><input type="submit" name="post" value="Post public comment" /></p>
+
+ <h1>Or edit it again</h1>
+ {% endif %}
+
+ {% if comment_form.person_name.errors %}
+ {{ comment_form.person_name.html_error_list }}
+ {% endif %}
+
+ <p><label for="id_person_name">Your name:</label> {{ comment_form.person_name }}</p>
+
+ {% if comment_form.comment.errors %}
+ {{ comment_form.comment.html_error_list }}
+ {% endif %}
+
+ <p>
+ <label for="id_comment">Comment:</label>
+ <br />
+ {{ comment_form.comment }}
+ </p>
+
+ <input type="hidden" name="options" value="{{ options }}" />
+ <input type="hidden" name="target" value="{{ target }}" />
+ <input type="hidden" name="gonzo" value="{{ hash }}" />
+
+ <p>
+ <input type="submit" name="preview" value="Preview revised comment" />
+ </p>
+</form>
+{% endblock %}