View | Details | Raw Unified | Return to bug 9694
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-41 / +18 lines)
Lines 7-13 Link Here
7
            function DeleteConfirm() {
7
            function DeleteConfirm() {
8
                var element_id = selected_layout("delete");
8
                var element_id = selected_layout("delete");
9
                if (element_id>-1) {
9
                if (element_id>-1) {
10
                    var msg = "Are you sure you want to delete [% card_element %] " + element_id + "?"
10
                    var msg = _("Are you sure you want to delete") + " [% card_element %] " + element_id + "?"
11
                    var answer = confirm(msg);
11
                    var answer = confirm(msg);
12
                    if (answer) {
12
                    if (answer) {
13
                        window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=" + element_id;
13
                        window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=" + element_id;
Lines 50-56 Link Here
50
                    alert(_("Please select at least one batch to export."));
50
                    alert(_("Please select at least one batch to export."));
51
                    return;     // no batch selected
51
                    return;     // no batch selected
52
                }
52
                }
53
                return GB_showCenter('Export Patron Cards', "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800);
53
                return GB_showCenter(_('Export patron cards'), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800);
54
            };
54
            };
55
            function selected_layout(op) {
55
            function selected_layout(op) {
56
                var selected = new Array;
56
                var selected = new Array;
Lines 76-120 Link Here
76
                alert(_("Please select a ")+"[% card_element %].");
76
                alert(_("Please select a ")+"[% card_element %].");
77
                return (-1);
77
                return (-1);
78
            };
78
            };
79
        //]]>
80
    </script>
81
    <script type="text/javascript">
82
        //<![CDATA[
83
        $(document).ready(function() {
84
            $("#edit").empty();
85
            $("#delete").empty();
86
            [% IF ( print ) %]
87
            $("#xport").empty();
88
            [% END %]
89
            buildButtons();
90
         });
91
79
92
        function buildButtons() {
80
        $(document).ready(function() {
93
            var editButton = new YAHOO.widget.Button({
81
            $("#edit").click(function(){
94
                type: "link",
82
                Edit();
95
                onclick: {fn: Edit},
83
                return false;
96
                label: _("Edit"),
97
                id: "edit",
98
                container: "edit"
99
            });
84
            });
100
            var deleteButton = new YAHOO.widget.Button({
85
            $("#delete").click(function(){
101
                type: "link",
86
                DeleteConfirm();
102
                onclick: {fn: DeleteConfirm},
87
                return false;
103
                label: _("Delete"),
104
                id: "delete",
105
                container: "delete",
106
            });
88
            });
107
            [% IF ( print ) %]
89
            $("#print").click(function(){
108
            var xportButton = new YAHOO.widget.Button({
90
                Xport();
109
                type: "link",
91
                return false;
110
                onclick: {fn: Xport},
111
                label: _("Export"),
112
                id: "xport",
113
                container: "xport",
114
            });
92
            });
115
            [% END %]
93
         });
116
        };
94
//]]>
117
    </script>
95
</script>
118
</head>
96
</head>
119
<body id="pcard_manage" class="tools pcard">
97
<body id="pcard_manage" class="tools pcard">
120
    [% INCLUDE 'header.inc' %]
98
    [% INCLUDE 'header.inc' %]
Lines 161-169 Link Here
161
                                [% END %]
139
                                [% END %]
162
                            </table>
140
                            </table>
163
                            <fieldset class="action">
141
                            <fieldset class="action">
164
                                <span id="edit"><input type="button" id="edit" onclick="Edit()" value="Edit" /></span>
142
                                <input type="button" id="edit" value="Edit" />
165
                                <span id="delete"><input type="button" id="delete" onclick="DeleteConfirm()" value="Delete" /></span>
143
                                <input type="button" id="delete" value="Delete" />
166
                                [% IF ( print ) %]<span id="xport"><input type="button" id="print" onclick="Xport()" value="Export" /></span>[% END %]
144
                                [% IF ( print ) %]<input type="button" id="print" value="Export" />[% END %]
167
                            </fieldset>
145
                            </fieldset>
168
                            </form>
146
                            </form>
169
                            [% ELSE %]
147
                            [% ELSE %]
170
- 

Return to bug 9694