Sync translations from Transifex and run lupdate
[qBittorrent.git] / src / webui / www / private / upload.html
blobb2e2b018cfa20e2a81be4b3375704ad83343f25a
1 <!DOCTYPE html>
2 <html lang="${LANG}">
4 <head>
5 <meta charset="UTF-8" />
6 <title>QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]</title>
7 <link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
8 <link rel="stylesheet" href="css/Window.css?v=${CACHEID}" type="text/css" />
9 <script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
10 <script src="scripts/download.js?v=${CACHEID}"></script>
11 </head>
13 <body>
14 <iframe id="upload_frame" name="upload_frame" class="invisible" title="" src="about:blank"></iframe>
15 <form action="api/v2/torrents/add" enctype="multipart/form-data" method="post" id="uploadForm" style="text-align: center;" target="upload_frame" autocorrect="off" autocapitalize="none">
16 <div style="margin-top: 25px; display: inline-block; border: 1px solid lightgrey; border-radius: 4px;">
17 <input type="file" id="fileselect" accept=".torrent, application/x-bittorrent" name="fileselect[]" multiple />
18 </div>
19 <fieldset class="settings" style="border: 0; text-align: left; margin-top: 12px;">
20 <table style="margin: auto;">
21 <tr>
22 <td>
23 <label for="autoTMM">QBT_TR(Torrent Management Mode:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
24 </td>
25 <td>
26 <select id="autoTMM" name="autoTMM" onchange="qBittorrent.Download.changeTMM(this)">
27 <option selected value="false">QBT_TR(Manual)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
28 <option value="true">QBT_TR(Automatic)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
29 </select>
30 </td>
31 </tr>
32 <tr>
33 <td>
34 <label for="savepath">QBT_TR(Save files to location:)QBT_TR[CONTEXT=HttpServer]</label>
35 </td>
36 <td>
37 <input type="text" id="savepath" name="savepath" style="width: 16em;" />
38 </td>
39 </tr>
40 <tr>
41 <td>
42 <label for="rename">QBT_TR(Rename torrent)QBT_TR[CONTEXT=HttpServer]</label>
43 </td>
44 <td>
45 <input type="text" id="rename" name="rename" style="width: 16em;" />
46 </td>
47 </tr>
48 <tr>
49 <td>
50 <label for="category">QBT_TR(Category:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
51 </td>
52 <td>
53 <div class="select-watched-folder-editable">
54 <select id="categorySelect" onchange="qBittorrent.Download.changeCategorySelect(this)">
55 <option selected value="\other"></option>
56 </select>
57 <input name="category" type="text" />
58 </div>
59 </td>
60 </tr>
61 <tr>
62 <td>
63 <label for="startTorrent">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
64 </td>
65 <td>
66 <input type="hidden" id="startTorrentHidden" name="paused" />
67 <input type="checkbox" id="startTorrent" />
68 </td>
69 </tr>
70 <tr>
71 <td>
72 <label for="addToTopOfQueue">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
73 </td>
74 <td>
75 <input type="checkbox" id="addToTopOfQueue" name="addToTopOfQueue" value="true" />
76 </td>
77 </tr>
78 <tr>
79 <td>
80 <label for="stopCondition">QBT_TR(Stop condition:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
81 </td>
82 <td>
83 <select id="stopCondition" name="stopCondition">
84 <option selected value="None">QBT_TR(None)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
85 <option value="MetadataReceived">QBT_TR(Metadata received)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
86 <option value="FilesChecked">QBT_TR(Files checked)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
87 </select>
88 </td>
89 </tr>
90 <tr>
91 <td>
92 <label for="skip_checking">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
93 </td>
94 <td>
95 <input type="checkbox" id="skip_checking" name="skip_checking" value="true" />
96 </td>
97 </tr>
98 <tr>
99 <td>
100 <label for="contentLayout">QBT_TR(Content layout:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
101 </td>
102 <td>
103 <select id="contentLayout" name="contentLayout">
104 <option selected value="Original">QBT_TR(Original)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
105 <option value="Subfolder">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
106 <option value="NoSubfolder">QBT_TR(Don't create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</option>
107 </select>
108 </td>
109 </tr>
110 <tr>
111 <td>
112 <label for="sequentialDownload">QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]</label>
113 </td>
114 <td>
115 <input type="checkbox" id="sequentialDownload" name="sequentialDownload" value="true" />
116 </td>
117 </tr>
118 <tr>
119 <td>
120 <label for="firstLastPiecePrio">QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]</label>
121 </td>
122 <td>
123 <input type="checkbox" id="firstLastPiecePrio" name="firstLastPiecePrio" value="true" />
124 </td>
125 </tr>
126 <tr>
127 <td>
128 <label for="dlLimitText">QBT_TR(Limit download rate)QBT_TR[CONTEXT=HttpServer]</label>
129 </td>
130 <td>
131 <input type="hidden" id="dlLimitHidden" name="dlLimit" />
132 <input type="text" id="dlLimitText" style="width: 16em;" placeholder="KiB/s" />
133 </td>
134 </tr>
135 <tr>
136 <td>
137 <label for="upLimitText">QBT_TR(Limit upload rate)QBT_TR[CONTEXT=HttpServer]</label>
138 </td>
139 <td>
140 <input type="hidden" id="upLimitHidden" name="upLimit" />
141 <input type="text" id="upLimitText" style="width: 16em;" placeholder="KiB/s" />
142 </td>
143 </tr>
144 </table>
145 <div id="submitbutton" style="margin-top: 30px; text-align: center;">
146 <button type="submit" style="font-size: 1em;">QBT_TR(Upload Torrents)QBT_TR[CONTEXT=HttpServer]</button>
147 </div>
148 </fieldset>
149 </form>
150 <script>
151 'use strict';
153 let submitted = false;
155 $('uploadForm').addEventListener("submit", function() {
156 $('startTorrentHidden').value = $('startTorrent').checked ? 'false' : 'true';
158 $('dlLimitHidden').value = $('dlLimitText').value.toInt() * 1024;
159 $('upLimitHidden').value = $('upLimitText').value.toInt() * 1024;
161 $('upload_spinner').style.display = "block";
162 submitted = true;
165 $('upload_frame').addEventListener("load", function() {
166 if (submitted)
167 window.parent.closeWindows();
170 if ((Browser.platform === 'ios') || ((Browser.platform === 'mac') && (navigator.maxTouchPoints > 1))) {
171 $('fileselect').accept = ".torrent";
173 </script>
174 <div id="upload_spinner" class="mochaSpinner"></div>
175 </body>
177 </html>