summaryrefslogtreecommitdiffstats
path: root/askbot/deps/livesettings/templates/livesettings/group_settings.html
blob: faed7128cb7547ec79f147382594fa578c49b788 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{% extends "admin/base_site.html" %}
{% load i18n admin_modify config_tags static %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}" />
{% endblock %}

{% block stylesheet %}{% static "admin/css/forms.css" %}{% endblock %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}dashboard{% endblock %}
{% block userlinks %}<a href="/admin/doc/">{% trans 'Documentation' %}</a> / <a href="/admin/password_change/">{% trans 'Change password' %}</a> / <a href="/admin/logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
     <a href="/admin/">{% trans "Home" %}</a> &rsaquo;
     {% trans "Edit Group Settings" %}
</div>
{% endif %}{% endblock %}
{% block content %}
<div id="content-main">
{% if form.errors %}
    <p class="errornote">
    {% blocktrans count form.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
{% endif %}
{% if form.fields %}
<form method="post" enctype="multipart/form-data">{% csrf_token %}
    <div class="module">
    <table summary="{% filter capfirst %}{% blocktrans with group.name as name %}Settings included in {{ name }}.{% endblocktrans %}{% endfilter %}" width="100%">
        {% for field in form %}
            {% if field.is_hidden %}
                <!-- skip hidden field {{field.key}} -->
            {% else %}
                {% if field.errors %}
                <tr class="error">
                    <td colspan="2">{{ field.errors }}</td>
                </tr>
                {% endif %}
                <tr{% if field.errors %} class="error"{% endif %}>
                    <td style="width: 50%;">
                        {{ field.label_tag }}
                        {% if field.help_text %}
                            <p class="help">{{ field.help_text|safe }}</p>
                        {% endif %}
                        {% if field.field.default_text %}
                            <p class="help">{{ field.field.default_text|safe }}</p>
                        {% endif %}
                    </td>
                    <td>{{ field }}</td>
                </tr>
            {% endif %}
        {% endfor %}
    </table>
        {% for field in form %}
            {% if field.is_hidden %}
                {{field}}
            {% endif %}
        {% endfor %}
    </div>
    <input type="submit" value="Save" class="default" />
</form>
{% else %}
    <p>{% trans "You don't have permission to edit values." %}</p>
{% endif %}
</div>
{% if all_super_groups %}
    <div id="content-related">
    {% for super_group in all_super_groups %}
        <div class="module">
            <h2>{{ super_group.name }}</h2>
            <ul>
            {% for g in super_group.groups %}
                {% if g.keys|length %}
                    {% ifequal g.key group.key %}
                        <li><b>{{g.name}}</b></li>
                    {% else %}
                        <li><a href="{% url group_settings g.key %}">{{g.name}}</a></li>
                    {% endifequal %}
                {% endif %}
            {% endfor %}
            </ul>
        </div>
    {% endfor %}
    </div>
{% endif %}
{% endblock %}