1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <title>Upload plugin</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <script type="text/javascript" src="[% interface %]/lib/jquery/jquery.js"></script>
8 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/staff-global.css" />
9 <script type="text/javascript">
10 function ValidateForm() {
11 var filename = document.forms["UploadForm"]["uploaded_file"].value;
13 alert("Please select a file to upload.");
21 <body id="cat_upload" class="cat">
23 <div id="doc3" class="yui-t2"><div id="bd"><div id="yui-main">
27 <script type="text/javascript">
29 var doc = opener.document;
30 var field = doc.getElementById("[% index %]");
31 field.value = "[% return %]";
33 $(document).ready(function() {
39 The file [% uploaded_file | html %] has been successfully uploaded.
40 <p><input type="button" value="close" onclick="window.close();" /></p>
44 [% IF ( MissingURL ) %]
45 <p>Error: The OPAC system preference OPACBaseURL is not configured.</p>
46 <p><input type="button" value="close" onclick="window.close();" /></p>
48 <p>Error: Failed to upload file. See logs for details.</p>
49 <p><input type="button" value="close" onclick="window.close();" /></p>
51 [% IF (error_upload_path_not_configured) %]
52 <h2>Configuration error</h2>
53 <p>Configuration variable 'upload_path' is not configured.</p>
54 <p>Please configure it in your koha-conf.xml</p>
56 [% IF (error_nothing_selected) %]
57 <p class="error">Error: You have to choose the file to upload and select where to upload the file.</p>
59 [% IF (error_no_file_selected) %]
60 <p class="error">Error: You have to choose the file to upload.</p>
62 [% IF (error_no_dir_selected) %]
63 <p class="error">Error: You have to select where to upload the file.</p>
66 <p class="error">Error: The URL has no file to retrieve.</p>
69 <h2>Please select the file to upload:</h2>
70 <form name="UploadForm" method="post" enctype="multipart/form-data" action="/cgi-bin/koha/cataloguing/plugin_launcher.pl" onsubmit="return ValidateForm()">
71 <input type="hidden" name="from_popup" value="1" />
72 <input type="hidden" name="plugin_name" value="upload.pl" />
73 <input type="hidden" name="index" value="[% index %]" />
75 <div>[% filefield %]</div>
78 <label for="uploadcategory">Category: </label>
79 [% IF uploadcategories %]
80 <select id="uploadcategory" name="uploadcategory">
81 [% FOREACH cat IN uploadcategories %]
82 <option value="[% cat.code %]">[% cat.name %]</option>
86 <input type="hidden" name="uploadcategory" value="CATALOGUING" />
90 <fieldset class="action">
91 <input type="submit" value="Upload">
92 <input type="button" value="Cancel" onclick="window.close();" />