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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-61 / +14 lines)
Lines 35-92 Link Here
35
                alert(_("Please select image(s) to ") + op + ".");
35
                alert(_("Please select image(s) to ") + op + ".");
36
                return (-1);
36
                return (-1);
37
            };
37
            };
38
            function showHideLayers(element, time, action) {
39
                setTimeout("changeVisibility('" + element + "','" + action + "')", time)
40
            }
41
            function changeVisibility(element, action) {
42
                document.getElementById(element).style.display=action;
43
            }
44
    </script>
45
    <script type="text/javascript">
46
        //<![CDATA[
47
        $(document).ready(function() {
38
        $(document).ready(function() {
48
            $("#upload_cancel").empty();
39
            $("#delete").click(function(){
49
            $("#delete_cancel").empty();
40
                return DeleteConfirm();
50
            $("#upload").empty();
51
            $("#delete").empty();
52
            buildButtons();
53
            showHideLayers('dialog', 5000, 'none')
54
         });
55
56
        function buildButtons() {
57
            new YAHOO.widget.Button({
58
                type: "link",
59
                label: _("Cancel"),
60
                id: "cancelul",
61
                href: "/cgi-bin/koha/patroncards/home.pl",
62
                container: "upload_cancel"
63
            });
41
            });
64
42
         });
65
            new YAHOO.widget.Button({
43
        //]]>
66
                type: "link",
67
                label: _("Cancel"),
68
                id: "canceldel",
69
                href: "/cgi-bin/koha/patroncards/home.pl",
70
                container: "delete_cancel"
71
            });
72
73
            new YAHOO.widget.Button({
74
                type: "submit",
75
                label: _("Upload"),
76
                id: "uploadsb",
77
                value: "upload",
78
                container: "upload"
79
            });
80
81
            var deleteButton = new YAHOO.widget.Button({
82
                type: "link",
83
                onclick: {fn: DeleteConfirm},
84
                label: _("Delete"),
85
                id: "deletesb",
86
                value: "delete",
87
                container: "delete",
88
            });
89
        }
90
    </script>
44
    </script>
91
</head>
45
</head>
92
<body id="pcard_image-manage" class="tools pcard">
46
<body id="pcard_image-manage" class="tools pcard">
Lines 108-116 Link Here
108
                        <h1>Upload Images</h1>
62
                        <h1>Upload Images</h1>
109
                        [% IF ( IMPORT_SUCCESSFUL ) %]
63
                        [% IF ( IMPORT_SUCCESSFUL ) %]
110
                        <div id="dialog" class="dialog message">
64
                        <div id="dialog" class="dialog message">
111
                            <li><h3>Image successfully uploaded.</h3></li>
65
                            <h3>Image successfully uploaded</h3>
112
                            <li>File: [% SOURCE_FILE %]</li>
66
                            <ul><li>File: [% SOURCE_FILE %]</li>
113
                            <li>Image name: [% IMAGE_NAME %]</li>
67
                            <li>Image name: [% IMAGE_NAME %]</li></ul>
114
                        </div>
68
                        </div>
115
                        [% END %]
69
                        [% END %]
116
                        <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
70
                        <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
Lines 118-123 Link Here
118
                                <div class="hint">
72
                                <div class="hint">
119
                                    <b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB.
73
                                    <b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB.
120
                                </div>
74
                                </div>
75
                                <ol>
121
                                <li>
76
                                <li>
122
                                    <label for="uploadfile">Select the file to upload: </label>
77
                                    <label for="uploadfile">Select the file to upload: </label>
123
                                    <input type="file" id="uploadfile" name="uploadfile" />
78
                                    <input type="file" id="uploadfile" name="uploadfile" />
Lines 130-140 Link Here
130
                                    </div>
85
                                    </div>
131
                                    <input type="text" id="image_name" name="image_name" size="20" />
86
                                    <input type="text" id="image_name" name="image_name" size="20" />
132
                                </li>
87
                                </li>
88
                                </ol>
133
                            </fieldset>
89
                            </fieldset>
134
                            <fieldset class="action">
90
                            <fieldset class="action">
135
                                <input type="hidden" name="op" value="upload" />
91
                                <input type="hidden" name="op" value="upload" />
136
                                <span id="upload"><input id="uploadsu" type="submit" value="upload" class="submit" /></span>
92
                                <input id="uploadsu" type="submit" value="Upload" />
137
                                <span id="upload_cancel"><a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span>
93
                                <a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
138
                            </fieldset>
94
                            </fieldset>
139
                        </form>
95
                        </form>
140
                    </div>
96
                    </div>
Lines 142-148 Link Here
142
                    <h1>Delete Images</h1>
98
                    <h1>Delete Images</h1>
143
                        [% IF ( DELETE_SUCCESSFULL ) %]
99
                        [% IF ( DELETE_SUCCESSFULL ) %]
144
                        <div id="dialog" class="dialog message">
100
                        <div id="dialog" class="dialog message">
145
                            <li><h3>Image(s) successfully deleted.</h3></li>
101
                            <h3>Image(s) successfully deleted</h3>
146
                        </div>
102
                        </div>
147
                        [% END %]
103
                        [% END %]
148
                        [% IF ( TABLE ) %]
104
                        [% IF ( TABLE ) %]
Lines 151-157 Link Here
151
                                <div class="hint">
107
                                <div class="hint">
152
                                    Select one or more images to delete.
108
                                    Select one or more images to delete.
153
                                </div>
109
                                </div>
154
                           <li>
155
                               <table>
110
                               <table>
156
                                    [% FOREACH TABL IN TABLE %]
111
                                    [% FOREACH TABL IN TABLE %]
157
                                    [% IF ( TABL.header_fields ) %]
112
                                    [% IF ( TABL.header_fields ) %]
Lines 175-186 Link Here
175
                                    [% END %]
130
                                    [% END %]
176
                                    [% END %]
131
                                    [% END %]
177
                                </table>
132
                                </table>
178
                            </li>
179
                            </fieldset>
133
                            </fieldset>
180
                            <fieldset class="action">
134
                            <fieldset class="action">
181
                                <input type="hidden" name="op" value="delete" />
135
                                <input type="hidden" name="op" value="delete" />
182
                                <span id="delete"><input id="deletesu" type="button" id="delete" onclick="DeleteConfirm()" value="Delete image(s)" /></span>
136
                                <input type="button" id="delete" value="Delete" />
183
                                <span id="delete_cancel"><a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span>
137
                                <a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
184
                            </fieldset>
138
                            </fieldset>
185
                        </form>
139
                        </form>
186
                        [% ELSE %]
140
                        [% ELSE %]
187
- 

Return to bug 9693