summaryrefslogtreecommitdiff
path: root/lib/grappelli/templates/admin/csv_export_selected_confirmation.html
blob: 873bd87822466222b9b365565af8ad1cdfa0a257 (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
{% extends "admin/base_site.html" %}

<!-- LOADING -->
{% load i18n %}

<!-- BREADCRUMBS -->
{% block breadcrumbs %}
    <div id="breadcrumbs">
        <a href="../../">{% trans "Home" %}</a> &rsaquo;
        <a href="../">{{ app_label|capfirst }}</a> &rsaquo;
        <a href="./">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
        {% trans 'Export selection as CSV' %}
    </div>
{% endblock %}

<!-- CONTENT -->
{% block content %}
    <script type="text/javascript" charset="utf-8">
        (function($) {
            $(document).ready(function() {
                $("input").attr("autocomplete", "off");
                $('#select_all').click(function(){
                    $("._fields").attr('checked', $(this).attr('checked'));
                });
            });
        })(django.jQuery);
    </script>
    <div class="container-grid csv-export-confirmation">
        <form action="" method="post">{% csrf_token %}
            <fieldset class="module">
                <h2>{% blocktrans %}Export following fields:{% endblocktrans %}</h2>
                <div class="row">
                    <ul class="checkboxlist">
                        <li><label for="select_all"><input type="checkbox" name="select_all" value="" id="select_all" /> {% blocktrans %}Select all{% endblocktrans %}</label></li>
                    </ul>
                </div>
                <div class="row">
                    <ul class="checkboxlist">
                        {% for item in fields %}
                            <li>
                                <label for="id_{{ item.0 }}"><input type="checkbox" class="_fields" name="_fields" value="{{ item.0 }}" id="id_{{ item.0 }}"{% if item.0 in list_display %} checked="checked" {% endif %} /> {{ item.1 }}</label>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            </fieldset>
            <div class="module footer">
                {% for obj in queryset %}
                    <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk }}" />
                {% endfor %}
                <input type="hidden" name="action" value="csv_export_selected" />
                <input type="hidden" name="post" value="yes" />
                <ul class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>
                    <li class="left cancel-button-container"><a href="../" class="cancel-link">{% trans "Back" %}</a></li>
                    <li class="submit-button-container"><input type="submit" value="{% trans "Export" %}" class="default" /></li>
                </ul>
            </div>
        </form>
    </div>
{% endblock %}