blob: b8a5ce2cca555055575f51a478bad774428df5fd (
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
|
{% import "macros.html" as macros %}
<form id="fmask" action="" method="post" >{% csrf_token %}
<div class="form-item">
<div id="askFormBar">
{% if not request.user.is_authenticated() %}
<p>{% trans %}login to post question info{% endtrans %}</p>
<p>{% trans %}<span class=\"strong big\">You are welcome to start submitting your question anonymously</span>. When you submit the post, you will be redirected to the login/signup page. Your question will be saved in the current session and will be published after you log in. Login/signup process is very simple. Login takes about 30 seconds, initial signup takes a minute or less.{% endtrans %}</p>
{% else %}
{% if settings.EMAIL_VALIDATION %}
{% if not request.user.email_isvalid %}
{% trans email=request.user.email %}<span class='strong big'>Looks like your email address, %(email)s has not yet been validated.</span> To post messages you must verify your email, please see <a href='%(email_validation_faq_url)s'>more details here</a>.<br>You can submit your question now and validate email after that. Your question will saved as pending meanwhile.{% endtrans %}
{% endif %}
{% endif %}
{% endif %}
<input id="id_title" class="questionTitleInput" name="title" autocomplete="off"
value="{% if form.initial.title %}{{form.initial.title|escape}}{% endif %}"/>
<span class="form-error">{{ form.title.errors }}</span>
</div>
<div class="title-desc">
{{ form.title.help_text }}
</div>
</div>
<div id='question-list'></div>
{{
macros.edit_post(
form,
post_type = 'question',
edit_title = False,
mandatory_tags = mandatory_tags
)
}}
<div class="question-options">
{% if settings.WIKI_ON %}
{{ macros.checkbox_in_div(form.wiki) }}
{% endif %}
{% if settings.ALLOW_ASK_ANONYMOUSLY %}
{{ macros.checkbox_in_div(form.ask_anonymously) }}
{% endif %}
</div>
{% if not request.user.is_authenticated() %}
<input type="submit" name="post_anon" value="{% trans %}Login/Signup to Post{% endtrans %}" class="submit" />
{% else %}
<input type="submit" name="post" value="{% trans %}Ask Your Question{% endtrans %}" class="submit" />
{% endif %}
<div class="clean"></div>
</form>
|