From 9bc9eadfb93890b4f87642780427bcacd3689c2c Mon Sep 17 00:00:00 2001 From: whit Date: Thu, 12 Jul 2012 09:07:22 +0200 Subject: missing quotation marks in the label for field. --- askbot/skins/common/templates/widgets/edit_post.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot/skins/common/templates/widgets/edit_post.html b/askbot/skins/common/templates/widgets/edit_post.html index 66f79237..b083c009 100644 --- a/askbot/skins/common/templates/widgets/edit_post.html +++ b/askbot/skins/common/templates/widgets/edit_post.html @@ -18,7 +18,7 @@ {% if post_type == 'question' %}
{% if tags_are_required %} -
{% endif %} + +{% if user and user.is_staff and user.is_active %} + {# admin can post answers or questions on behalf of anyone. #} + {% if post_type == 'question' and edit_title %} + {# edit question already has 'user' field set #} +
+ {{ post_form.user_author.label_tag() }}
+ {{ post_form.user_author }} +
+ {{ post_form.user_author.help_text }} +
+
{{ post_form.user_author.errors }}
+
+ {% else %} +
+ {{ post_form.user.label_tag() }}
+ {{ post_form.user }} +
+ {{ post_form.user.help_text }} +
+
{{ post_form.user.errors }}
+
+ {% endif %} +{% endif %} +
{{ revision_form.revision }}
- {{ macros.edit_post(form) }} + {{ macros.edit_post(form, user = request.user) }} {% if settings.WIKI_ON and answer.wiki == False %} {{ macros.checkbox_in_div(form.wiki) }} {% endif %} diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html index 3e463c1c..3b9e5377 100644 --- a/askbot/skins/default/templates/macros.html +++ b/askbot/skins/default/templates/macros.html @@ -496,7 +496,8 @@ for the purposes of the AJAX comment editor #} post_form, post_type = None, mandatory_tags = None, - edit_title = False + edit_title = False, + user = None ) -%} {%include "widgets/edit_post.html" %} diff --git a/askbot/skins/default/templates/question/new_answer_form.html b/askbot/skins/default/templates/question/new_answer_form.html index 68af8afb..9868d3ba 100644 --- a/askbot/skins/default/templates/question/new_answer_form.html +++ b/askbot/skins/default/templates/question/new_answer_form.html @@ -39,7 +39,7 @@ {% endif %}

{% endif %} - {{ macros.edit_post(answer) }} + {{ macros.edit_post(answer, user = request.user) }}