blob: ee84f443bf8b7307c03246d5116488f0cbe5eef1 (
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
|
{% if edit_title %}
<div class="form-item">
<label for="id_title" ><strong>{{ post_form.title.label_tag() }}:</strong></label> <span class="form-error"></span><br/>
{{ post_form.title }} {{ post_form.title.errors }}
<div class="title-desc">
{{ post_form.title.help_text }}
</div>
</div>
{% endif %}
<div id="wmd-button-bar" class="wmd-panel"></div>
<div class="form-item">
{{ post_form.text }}{# this element is resizable and will be wrapped by js #}
<label for="editor" class="form-error">{{ post_form.text.errors }}</label>
</div>
{# need label element for resizable input, b/c form validation won't find span #}
{% if post_type == 'question' %}
<div class="form-item">
{% if tags_are_required %}
<label for=id_tags">
{% if mandatory_tags %}
<strong>{% trans %}tags{% endtrans %}</strong>
{% trans %}, one of these is required{% endtrans %}
{{
tag_list_widget(
mandatory_tags,
make_links = False,
css_class = 'clearfix'
)
}}
{% else %}
<strong>{% trans %}tags:{% endtrans %}</strong>
{% trans %}(required){% endtrans %}
{% endif %}
</label>
{% else %}
<strong>{% trans %}tags:{% endtrans %}</strong>
{% endif %}
<span class="form-error">{{ post_form.tags.errors }}</span><br/>
{{ post_form.tags }}
<div class="title-desc">
{{ post_form.tags.help_text }}
</div>
</div>
{% endif %}
{% if 'summary' in post_form['fields'] %}
<div class="form-item">
<strong>{{ post_form.summary.label_tag() }}</strong> <br/>
{{ post_form.summary }}
<div class="title-desc">
{{ post_form.summary.help_text }}
</div>
<div class="form-error" >{{ post_form.summary.errors }}</div>
</div>
{% endif %}
<div class="preview-toggle">
<span
id="pre-collapse"
title="{% trans %}Toggle the real time Markdown editor preview{% endtrans %}"
>
[{% trans %}hide preview{% endtrans %}]
</span>
</div>
<div id="previewer" class="wmd-preview"></div>
|