manage_qualifiers.html
3.01 KB
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
{% extends "base.html" %}
{% block extrahead %}
<link rel="stylesheet" type="text/css"
href="{{ MEDIA_URL }}css/manage_qualifiers.css"/>
<script type="text/javascript"
src="{{ MEDIA_URL }}js/manage-qualifiers.js"></script>
{% endblock %}
{% block title %}Kwalifikatory{% endblock %}
{% block content %}
<div id="vocab-accordion">
{% for vocab_name, add_exclusion_class_form, remove_exclusion_class_form, add_qualifier_form, qualifier_forms in form_list %}
<h3><a href="#">{{ vocab_name }}</a></h3>
<div>
<form action="" method="post">
{% csrf_token %}
{{ add_exclusion_class_form.as_table }}
<button type="submit">
dodaj klasę wykluczania
</button>
</form>
{% if remove_exclusion_class_form %}
<form action="" method="post">
{% csrf_token %}
{{ remove_exclusion_class_form.as_table }}
<button type="submit">
usuń klasę wykluczania
</button>
</form>
{% endif %}
<form action="" method="post">
{% csrf_token %}
{{ add_qualifier_form.as_table }}
<button type="submit">
dodaj kwalifikator
</button>
</form>
<ul>
{% for qualifier, form in qualifier_forms %}
<li>
<span class="qualifier-label">
{{ qualifier.label }}
</span>
<span class="qualifier-controls">
{% if qualifier.is_empty %}
<form action="" method="post">
{% csrf_token %}
<input type="hidden" name="det"
value="remove_qualifier"/>
<input type="hidden" name="id"
value="{{ qualifier.pk }}"/>
<button type="submit">
usuń
</button>
</form>
{% endif %}
<form action="" method="post">
{% csrf_token %}
{{ form.as_table }}
<button type="submit">
zmień
</button>
</form>
</span>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endblock %}