summaryrefslogtreecommitdiffstats
path: root/askbot/templates/widgets/tag_editor.html
blob: 8f3fa8cdaeac0a84a7194f0afa49e016a49f90cd (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
{% import "macros.html" as macros %}
<p style="margin:-18px 0 0 42px; color: brown; font-size: 13px; font-style: italic"
    class="tag-editor-error-alert"
>
    <span for="id_tags" generated="true" class="form-error" style="float: left;"></span>
</p>
<div class="tag-editor" style="margin-top: 18px">{# there's a hack with the margin in js as well #}
    {{ macros.tag_list_widget(
                        tag_names,
                        deletable = True,
                        make_links = False
                    )
    }}
    <input
        class="new-tags-input"
        type="text"
        name="new_tags_input"
    />
    <div class="clearfix"></div>
    <input 
        id="id_tags"
        name="tags"
        type="hidden"
        value="{% if tag_names %}{{tag_names|join(' ')}}{% endif %}"
    />
    {# 
        tag input is hidden because we want to edit the list visually 
        we also want to eventually allow multiword tags, which are
        not easy to enter into a simple input box
    #}
</div>