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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
{% extends "base.jinja.html" %}
<!-- question_retag.html -->
{% block title %}{% spaceless %}{% trans %}Change tags{% endtrans %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type='text/javascript' src='{{"/js/com.cnprog.editor.js"|media}}'></script>
<script type='text/javascript' src='{{"/js/com.cnprog.post.js"|media}}'></script>
<script type='text/javascript' src='{{"/js/jquery.validate.pack.js"|media}}'></script>
<script type="text/javascript">
$().ready(function(){
$("#nav_questions").attr('className',"on");
//Tags autocomplete action
var tags = {{ tags }};
$("#id_tags").autocomplete(tags, {
minChars: 1,
matchContains: true,
max: 20,
multiple: true,
multipleSeparator: " ",
formatItem: function(row, i, max) {
return row.n + " ("+ row.c +")";
},
formatResult: function(row, i, max){
return row.n;
}
});
$("#fmretag").validate({
rules: {
tags: {
required: true,
maxength: 105
}
},
messages: {
tags: {
required: "{% trans %}tags are required{% endtrans %}",
maxlength: "{% trans %}up to 5 tags, less than 20 characters each{% endtrans %}"
}
}
});
lanai.highlightSyntax();
});
</script>
{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
{% trans %}Change tags{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]
</div>
<div id="main-body" class="ask-body">
<div id="askform">
<form id="fmretag" action="{% url retag_question question.id %}" method="post" >
<h3>
{{ question.get_question_title() }}
</h3>
<div id="description" class="edit-content-html">
{{ question.html }}
</div>
<div class="form-item">
<strong>{{ form.tags.label_tag() }}:</strong> <span class="form-error"></span><br/>
{{ form.tags }} {{ form.tags.errors }}
<div class="title-desc">
{{ form.tags.help_text }}
</div>
</div>
<div class="error" ></div>
<input type="submit" value="{% trans %}Retag{% endtrans %}" class="submit" />
<input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" />
</form>
</div>
{% endblock %}
{% block sidebar %}
<div class="boxC">
<p class="subtitle">{% trans %}Why use and modify tags?{% endtrans %}</p>
<ul class="list-item">
<li>
<li>
{% trans %}tag editors receive special awards from the community{% endtrans %}
</li>
</ul>
<p class='info-box-follow-up-links'>
<a href="{% url faq %}">faq »</a>
</p>
</div>
{% endblock %}
{% block endjs %}
{% endblock %}
<!-- end question_retag.html -->
|