summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates/question/new_answer_form.html
blob: b2901e2a205abc74ca8338058ff143e55d7b518c (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
<form
        id="fmanswer"
        {% if user == question.author %}style="display:none"{% endif %}
        action="{% url answer question.id %}"
        method="post"
        >{% csrf_token %}
    {# ==== START: question/subscribe_by_email_prompt.html ==== #}
    {% include "question/subscribe_by_email_prompt.html" %}
    {# ==== END: question/subscribe_by_email_prompt.html ==== #}
    <div style="clear:both"></div>
    {% if request.user.is_anonymous() and settings.ALLOW_POSTING_BEFORE_LOGGING_IN == False %}
        {% if not thread.closed %}
            <a
                    class="submit"
                    href="{{settings.LOGIN_URL}}?next={% url question question.id %}"
                    >{% trans %}Login/Signup to Answer{% endtrans %}</a>
        {% endif %}
    {% else %}
        {% if not thread.closed %}
            <div>
                {% spaceless %}
                    <h2>
                        {% if answers %}
                            {% trans %}Your answer{% endtrans %}
                        {% else %}
                            {% trans %}Be the first one to answer this question!{% endtrans %}
                        {% endif %}
                    </h2>
                {% endspaceless %}
            </div>
            {% if request.user.is_anonymous() %}
                <div class="message">{% trans %}<span class='strong big'>Please start posting your answer anonymously</span> - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a <strong>substantial answer</strong>, for discussions, <strong>please use comments</strong> and <strong>please do remember to vote</strong> (after you log in)!{% endtrans %}</div>
            {% else %}
                <p class="message">
                    {% if request.user==question.author  %}
                        {% trans %}<span class='big strong'>You are welcome to answer your own question</span>, but please make sure to give an <strong>answer</strong>. Remember that you can always <strong>revise your original question</strong>. Please <strong>use comments for discussions</strong>  and <strong>please don't forget to vote :)</strong> for the answers that you liked (or perhaps did not like)!{% endtrans %}
                    {% else %}
                        {% trans %}<span class='big strong'>Please try to give a substantial answer</span>. If you wanted to comment on the question or answer, just <strong>use the commenting tool</strong>. Please remember that you can always <strong>revise your answers</strong> - no need to answer the same question twice. Also, please <strong>don't forget to vote</strong> - it really helps to select the best questions and answers!{% endtrans %}
                    {% endif %}
                </p>
            {% endif %}
            {{ macros.edit_post(answer) }}
            <input type="submit"
                    {% if user.is_anonymous() %}
                   value="{% trans %}Login/Signup to Post{% endtrans %}"
                    {% else %}
                        {% if user == question.author %}
                   value="{% trans %}Answer Your Own Question{% endtrans %}"
                        {% else %}
                   value="{% trans %}Post Your Answer{% endtrans %}"
                        {% endif %}
                    {% endif %}
                   class="submit after-editor" style="float:left"/>
            {% if settings.WIKI_ON %}
                {{ macros.checkbox_in_div(answer.wiki) }}
            {% endif %}
        {% endif %}
    {% endif %}
</form>