End Of Life - discontinue this branch!
[tomato.git] / release / src / router / www / nas-bittorrent.asp
blob9cc42684338aea039767401103f914d7eee02b23
1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
2 <!--
3 Tomato RAF Transmission GUI
4 Copyright (C) 2007-2011 Shibby
5 http://openlinksys.info
6 For use with Tomato RAF Firmware only.
7 No part of this file may be used without permission.
8 -->
9 <html>
10 <head>
11 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
12 <meta name='robots' content='noindex,nofollow'>
13 <title>[<% ident(); %>] Nas: BitTorrent Client</title>
14 <link rel='stylesheet' type='text/css' href='tomato.css'>
15 <link rel='stylesheet' type='text/css' href='color.css'>
16 <script type='text/javascript' src='tomato.js'></script>
17 <style type='text/css'>
18 textarea {
19 width: 98%;
20 height: 15em;
22 </style>
23 <script type='text/javascript'>
24 // <% nvram("bt_enable,bt_binary,bt_binary_custom,bt_custom,bt_port,bt_dir,bt_settings,bt_settings_custom,bt_incomplete,bt_rpc_enable,bt_rpc_wan,bt_auth,bt_login,bt_password,bt_port_gui,bt_dl_enable,bt_dl,bt_ul_enable,bt_ul,bt_peer_limit_global,bt_peer_limit_per_torrent,bt_ul_slot_per_torrent,bt_ratio_enable,bt_ratio,bt_ratio_idle_enable,bt_ratio_idle,bt_dht,bt_pex,bt_lpd,bt_utp,bt_blocklist,bt_blocklist_url,bt_sleep,bt_check,bt_check_time,bt_dl_queue_enable,bt_dl_queue_size,bt_ul_queue_enable,bt_ul_queue_size,bt_message"); %>
26 var btgui_link = '&nbsp;&nbsp;<a href="http://' + location.hostname +':<% nv('bt_port_gui'); %>" target="_blank"><i>[Click here to open Transmission GUI]</i></a>';
28 function verifyFields(focused, quiet)
30 var ok = 1;
32 var a = E('_f_bt_enable').checked;
33 var c = E('_f_bt_rpc_enable').checked;
34 var d = E('_f_bt_dl_enable').checked;
35 var e = E('_f_bt_ul_enable').checked;
36 var g = E('_f_bt_ratio_enable').checked;
37 var h = E('_f_bt_auth').checked;
38 var i = E('_f_bt_blocklist').checked;
39 var k = E('_f_bt_dl_queue_enable').checked;
40 var l = E('_f_bt_ul_queue_enable').checked;
41 var m = E('_f_bt_check').checked;
42 var n = E('_f_bt_ratio_idle_enable').checked;
44 E('_bt_custom').disabled = !a;
45 E('_bt_binary').disabled = !a;
46 E('_bt_dir').disabled = !a;
47 E('_bt_port').disabled = !a;
48 E('_bt_sleep').disabled = !a;
49 E('_f_bt_incomplete').disabled = !a;
50 E('_f_bt_check').disabled = !a;
51 E('_bt_check_time').disabled = !a || !m;
52 E('_bt_settings').disabled = !a;
53 E('_f_bt_rpc_enable').disabled = !a;
54 E('_bt_port_gui').disabled = !a || !c;
55 E('_f_bt_auth').disabled = !a || !c;
56 E('_bt_login').disabled = !a || !c || !h;
57 E('_bt_password').disabled = !a || !c | !h;
58 E('_f_bt_rpc_wan').disabled = !a || !c || !h;
59 E('_f_bt_dl_enable').disabled = !a;
60 E('_bt_dl').disabled = !a || !d;
61 E('_f_bt_ul_enable').disabled = !a;
62 E('_bt_ul').disabled = !a || !e;
63 E('_bt_peer_limit_global').disabled = !a;
64 E('_bt_peer_limit_per_torrent').disabled = !a;
65 E('_bt_ul_slot_per_torrent').disabled = !a;
66 E('_f_bt_ratio_enable').disabled = !a;
67 E('_bt_ratio').disabled = !a || !g;
68 E('_f_bt_ratio_idle_enable').disabled = !a;
69 E('_bt_ratio_idle').disabled = !a || !n;
70 E('_f_bt_dht').disabled = !a;
71 E('_f_bt_pex').disabled = !a;
72 E('_f_bt_lpd').disabled = !a;
73 E('_f_bt_utp').disabled = !a;
74 E('_f_bt_blocklist').disabled = !a;
75 E('_bt_blocklist_url').disabled = !a || !i;
76 E('_f_bt_dl_queue_enable').disabled = !a;
77 E('_bt_dl_queue_size').disabled = !a || !k;
78 E('_f_bt_ul_queue_enable').disabled = !a;
79 E('_bt_ul_queue_size').disabled = !a || !l;
80 E('_bt_message').disabled = !a;
82 var o = (E('_bt_settings').value == 'custom');
83 elem.display('_bt_settings_custom', o && a);
85 var p = (E('_bt_binary').value == 'custom');
86 elem.display('_bt_binary_custom', p && a);
88 if (!v_length('_bt_custom', quiet, 0, 2048)) ok = 0;
90 var s = E('_bt_custom');
91 if (s.value.search(/"rpc-enable":/) == 0) {
92 ferror.set(s, 'Cannot set "rpc-enable" option here. You can set it in Tomato GUI', quiet);
93 ok = 0; }
95 if (s.value.search(/"peer-port":/) == 0) {
96 ferror.set(s, 'Cannot set "peer-port" option here. You can set it in Tomato GUI', quiet);
97 ok = 0; }
99 if (s.value.search(/"speed-limit-down-enabled":/) == 0) {
100 ferror.set(s, 'Cannot set "speed-limit-down-enabled" option here. You can set it in Tomato GUI', quiet);
101 ok = 0; }
103 if (s.value.search(/"speed-limit-up-enabled":/) == 0) {
104 ferror.set(s, 'Cannot set "speed-limit-up-enabled" option here. You can set it in Tomato GUI', quiet);
105 ok = 0; }
107 if (s.value.search(/"speed-limit-down":/) == 0) {
108 ferror.set(s, 'Cannot set "speed-limit-down" option here. You can set it in Tomato GUI', quiet);
109 ok = 0; }
111 if (s.value.search(/"speed-limit-up":/) == 0) {
112 ferror.set(s, 'Cannot set "speed-limit-up" option here. You can set it in Tomato GUI', quiet);
113 ok = 0; }
115 if (s.value.search(/"rpc-port":/) == 0) {
116 ferror.set(s, 'Cannot set "rpc-port" option here. You can set it in Tomato GUI', quiet);
117 ok = 0; }
119 if (s.value.search(/"rpc-whitelist-enabled":/) == 0) {
120 ferror.set(s, 'Cannot set "rpc-whitelist-enabled" option here. Whitelist is always disabled', quiet);
121 ok = 0; }
123 if (s.value.search(/"rpc-username":/) == 0) {
124 ferror.set(s, 'Cannot set "rpc-username" option here. You can set it in Tomato GUI', quiet);
125 ok = 0; }
127 if (s.value.search(/"rpc-password":/) == 0) {
128 ferror.set(s, 'Cannot set "rpc-password" option here. You can set it in Tomato GUI', quiet);
129 ok = 0; }
131 if (s.value.search(/"download-dir":/) == 0) {
132 ferror.set(s, 'Cannot set "download-dir" option here. You can set it in Tomato GUI', quiet);
133 ok = 0; }
135 if (s.value.search(/"incomplete-dir-enabled":/) == 0) {
136 ferror.set(s, 'Cannot set "incomplete-dir-enabled" option here. You can set it in Tomato GUI', quiet);
137 ok = 0; }
139 if (s.value.search(/"incomplete-dir":/) == 0) {
140 ferror.set(s, 'Cannot set "incomplete-dir" option here. If incomplete dir is enabled, all incomplete files will be downloaded to "/download_dir/.incomplete" directory.', quiet);
141 ok = 0; }
143 if (s.value.search(/"peer-limit-global":/) == 0) {
144 ferror.set(s, 'Cannot set "peer-limit-global" option here. You can set it in Tomato GUI', quiet);
145 ok = 0; }
147 if (s.value.search(/"peer-limit-per-torrent":/) == 0) {
148 ferror.set(s, 'Cannot set "peer-limit-per-torrent" option here. You can set it in Tomato GUI', quiet);
149 ok = 0; }
151 if (s.value.search(/"upload-slots-per-torrent":/) == 0) {
152 ferror.set(s, 'Cannot set "upload-slots-per-torrent" option here. You can set it in Tomato GUI', quiet);
153 ok = 0; }
155 if (s.value.search(/"dht-enabled":/) == 0) {
156 ferror.set(s, 'Cannot set "dht-enabled" option here. You can set it in Tomato GUI', quiet);
157 ok = 0; }
159 if (s.value.search(/"pex-enabled":/) == 0) {
160 ferror.set(s, 'Cannot set "pex-enabled" option here. You can set it in Tomato GUI', quiet);
161 ok = 0; }
163 if (s.value.search(/"lpd-enabled":/) == 0) {
164 ferror.set(s, 'Cannot set "lpd-enabled" option here. You can set it in Tomato GUI', quiet);
165 ok = 0; }
167 if (s.value.search(/"utp-enabled":/) == 0) {
168 ferror.set(s, 'Cannot set "utp-enabled" option here. You can set it in Tomato GUI', quiet);
169 ok = 0; }
171 if (s.value.search(/"ratio-limit-enabled":/) == 0) {
172 ferror.set(s, 'Cannot set "ratio-limit-enabled" option here. You can set it in Tomato GUI', quiet);
173 ok = 0; }
175 if (s.value.search(/"ratio-limit":/) == 0) {
176 ferror.set(s, 'Cannot set "ratio-limit" option here. You can set it in Tomato GUI', quiet);
177 ok = 0; }
179 if (s.value.search(/"rpc-authentication-required":/) == 0) {
180 ferror.set(s, 'Cannot set "rpc-authentication-required" option here. You can set it in Tomato GUI', quiet);
181 ok = 0; }
183 if (s.value.search(/"blocklist-enabled":/) == 0) {
184 ferror.set(s, 'Cannot set "blocklist-enabled" option here. You can set it in Tomato GUI', quiet);
185 ok = 0; }
187 if (s.value.search(/"blocklist-url":/) == 0) {
188 ferror.set(s, 'Cannot set "blocklist-url" option here. You can set it in Tomato GUI', quiet);
189 ok = 0; }
191 if (s.value.search(/"download-queue-enabled":/) == 0) {
192 ferror.set(s, 'Cannot set "download-queue-enabled" option here. You can set it in Tomato GUI', quiet);
193 ok = 0; }
195 if (s.value.search(/"download-queue-size":/) == 0) {
196 ferror.set(s, 'Cannot set "download-queue-size" option here. You can set it in Tomato GUI', quiet);
197 ok = 0; }
199 if (s.value.search(/"seed-queue-enabled":/) == 0) {
200 ferror.set(s, 'Cannot set "seed-queue-enabled" option here. You can set it in Tomato GUI', quiet);
201 ok = 0; }
203 if (s.value.search(/"seed-queue-size":/) == 0) {
204 ferror.set(s, 'Cannot set "seed-queue-size" option here. You can set it in Tomato GUI', quiet);
205 ok = 0; }
207 if (s.value.search(/"idle-seeding-limit-enabled":/) == 0) {
208 ferror.set(s, 'Cannot set "idle-seeding-limit-enabled" option here. You can set it in Tomato GUI', quiet);
209 ok = 0; }
211 if (s.value.search(/"idle-seeding-limit":/) == 0) {
212 ferror.set(s, 'Cannot set "idle-seeding-limit" option here. You can set it in Tomato GUI', quiet);
213 ok = 0; }
215 if (s.value.search(/"message-level":/) == 0) {
216 ferror.set(s, 'Cannot set "message-level" option here. You can set it in Tomato GUI', quiet);
217 ok = 0; }
219 return ok;
222 function save()
224 if (verifyFields(null, 0)==0) return;
225 var fom = E('_fom');
226 fom.bt_enable.value = E('_f_bt_enable').checked ? 1 : 0;
227 fom.bt_incomplete.value = E('_f_bt_incomplete').checked ? 1 : 0;
228 fom.bt_check.value = E('_f_bt_check').checked ? 1 : 0;
229 fom.bt_rpc_enable.value = E('_f_bt_rpc_enable').checked ? 1 : 0;
230 fom.bt_auth.value = E('_f_bt_auth').checked ? 1 : 0;
231 fom.bt_rpc_wan.value = E('_f_bt_rpc_wan').checked ? 1 : 0;
232 fom.bt_dl_enable.value = E('_f_bt_dl_enable').checked ? 1 : 0;
233 fom.bt_ul_enable.value = E('_f_bt_ul_enable').checked ? 1 : 0;
234 fom.bt_ratio_enable.value = E('_f_bt_ratio_enable').checked ? 1 : 0;
235 fom.bt_ratio_idle_enable.value = E('_f_bt_ratio_idle_enable').checked ? 1 : 0;
236 fom.bt_dht.value = E('_f_bt_dht').checked ? 1 : 0;
237 fom.bt_pex.value = E('_f_bt_pex').checked ? 1 : 0;
238 fom.bt_lpd.value = E('_f_bt_lpd').checked ? 1 : 0;
239 fom.bt_utp.value = E('_f_bt_utp').checked ? 1 : 0;
240 fom.bt_blocklist.value = E('_f_bt_blocklist').checked ? 1 : 0;
241 fom.bt_dl_queue_enable.value = E('_f_bt_dl_queue_enable').checked ? 1 : 0;
242 fom.bt_ul_queue_enable.value = E('_f_bt_ul_queue_enable').checked ? 1 : 0;
244 if (fom.bt_enable.value == 0) {
245 fom._service.value = 'bittorrent-stop';
247 else {
248 fom._service.value = 'bittorrent-restart';
250 form.submit('_fom', 1);
253 function init()
256 </script>
257 </head>
259 <body onLoad="init()">
260 <table id='container' cellspacing=0>
261 <tr><td colspan=2 id='header'>
262 <div class='title'>Tomato</div>
263 <div class='version'>Version <% version(); %></div>
264 </td></tr>
265 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
266 <td id='content'>
267 <div id='ident'><% ident(); %></div>
268 <div class='section-title'>Basic Settings</div>
269 <div class='section' id='config-section'>
270 <form id='_fom' method='post' action='tomato.cgi'>
271 <input type='hidden' name='_nextpage' value='nas-bittorrent.asp'>
272 <input type='hidden' name='_service' value='bittorrent-restart'>
273 <input type='hidden' name='bt_enable'>
274 <input type='hidden' name='bt_incomplete'>
275 <input type='hidden' name='bt_check'>
276 <input type='hidden' name='bt_rpc_enable'>
277 <input type='hidden' name='bt_auth'>
278 <input type='hidden' name='bt_rpc_wan'>
279 <input type='hidden' name='bt_dl_enable'>
280 <input type='hidden' name='bt_ul_enable'>
281 <input type='hidden' name='bt_blocklist'>
282 <input type='hidden' name='bt_ratio_enable'>
283 <input type='hidden' name='bt_ratio_idle_enable'>
284 <input type='hidden' name='bt_dht'>
285 <input type='hidden' name='bt_pex'>
286 <input type='hidden' name='bt_lpd'>
287 <input type='hidden' name='bt_utp'>
288 <input type='hidden' name='bt_dl_queue_enable'>
289 <input type='hidden' name='bt_ul_queue_enable'>
291 <script type='text/javascript'>
292 createFieldTable('', [
293 { title: 'Enable torrent client', name: 'f_bt_enable', type: 'checkbox', value: nvram.bt_enable == '1', suffix: ' <small>*</small>' },
294 { title: 'Transmission binary path', multi: [
295 { name: 'bt_binary', type: 'select', options: [
296 /* BBT-BEGIN */
297 ['internal','Internal (/usr/bin)'],
298 /* BBT-END */
299 ['optware','Optware (/opt/bin)'],
300 ['custom','Custom'] ], value: nvram.bt_binary, suffix: ' <small>*</small> ' },
301 { name: 'bt_binary_custom', type: 'text', maxlen: 40, size: 40, value: nvram.bt_binary_custom }
302 ] },
303 { title: 'Keep alive', name: 'f_bt_check', type: 'checkbox', value: nvram.bt_check == '1', suffix: ' <small>*</small>' },
304 { title: 'Check alive every', indent: 2, name: 'bt_check_time', type: 'text', maxlen: 5, size: 7, value: nvram.bt_check_time, suffix: ' <small>minutes (range: 1 - 55; default: 15)</small>' },
305 { title: 'Delay at startup', name: 'bt_sleep', type: 'text', maxlen: 5, size: 7, value: nvram.bt_sleep, suffix: ' <small>seconds (range: 1 - 60; default: 10)</small>' },
306 { title: 'Listening port', name: 'bt_port', type: 'text', maxlen: 5, size: 7, value: nvram.bt_port, suffix: ' <small>*</small>' },
307 { title: 'Download directory', name: 'bt_dir', type: 'text', maxlen: 40, size: 40, value: nvram.bt_dir },
308 { title: 'Use .incomplete/', indent: 2, name: 'f_bt_incomplete', type: 'checkbox', value: nvram.bt_incomplete == '1' }
310 </script>
311 <ul>
312 <li><b>Enable torrent client</b> - Caution! - If your router only has 32MB of RAM, you'll have to use swap.
313 <li><b>Transmission binary path</b> Path to the directory containing transmission-daemon etc.
314 <li><b>Keep alive</b> - If enabled, transmission-daemon will be checked at the specified interval and will re-launch after a crash.
315 <li><b>Listening port</b> - Port used for torrent client. Make sure this port is not in use.
316 </ul>
317 </div>
318 <div class='section-title'>Remote Access<script>W(btgui_link);</script></div>
319 <div class='section'>
320 <script type='text/javascript'>
321 createFieldTable('', [
322 { title: 'Enable GUI', name: 'f_bt_rpc_enable', type: 'checkbox', value: nvram.bt_rpc_enable == '1' },
323 { title: 'Listening GUI port', indent: 2, name: 'bt_port_gui', type: 'text', maxlen: 32, size: 5, value: nvram.bt_port_gui, suffix: ' <small>*</small>' },
324 { title: 'Authentication required', name: 'f_bt_auth', type: 'checkbox', value: nvram.bt_auth == '1', suffix: ' <small>*</small>' },
325 { title: 'Username', indent: 2, name: 'bt_login', type: 'text', maxlen: 32, size: 15, value: nvram.bt_login },
326 { title: 'Password', indent: 2, name: 'bt_password', type: 'password', maxlen: 32, size: 15, value: nvram.bt_password },
327 { title: 'Allow remote access', name: 'f_bt_rpc_wan', type: 'checkbox', value: nvram.bt_rpc_wan == '1', suffix: ' <small>*</small>' }
329 </script>
330 <ul>
331 <li><b>Listening GUI port</b> - Port used for Transmission GUI. Make sure this port is not in use.
332 <li><b>Authentication required</b> - Authentication is <b><i>highly recomended</i></b>. GUI will prompt for user/pass.
333 <li><b>Allow remote access</b> - This option will open the Transmission GUI port from the WAN side and allow the GUI to be accessed from the internet.
334 </ul>
335 </div>
336 <div class='section-title'>Limits</div>
337 <div class='section'>
338 <script type='text/javascript'>
339 createFieldTable('', [
340 { title: 'Download limit', multi: [
341 { name: 'f_bt_dl_enable', type: 'checkbox', value: nvram.bt_dl_enable == '1', suffix: ' ' },
342 { name: 'bt_dl', type: 'text', maxlen: 10, size: 7, value: nvram.bt_dl, suffix: ' <small>kB/s</small>' } ] },
343 { title: 'Upload limit', multi: [
344 { name: 'f_bt_ul_enable', type: 'checkbox', value: nvram.bt_ul_enable == '1', suffix: ' ' },
345 { name: 'bt_ul', type: 'text', maxlen: 10, size: 7, value: nvram.bt_ul, suffix: ' <small>kB/s</small>' } ] },
346 { title: 'Stop seeding at ratio', multi: [
347 { name: 'f_bt_ratio_enable', type: 'checkbox', value: nvram.bt_ratio_enable == '1', suffix: ' ' },
348 { name: 'bt_ratio', type: 'select', options: [['0.0000','0.0'],['0.1000','0.1'],['0.2000','0.2'],['0.5000','0.5'],['1.0000','1.0'],['1.5000','1.5'],['2.0000','2.0'],['2.5000','2.5'],['3.0000','3.0']], value: nvram.bt_ratio } ] },
349 { title: 'Stop seeding if idle for', multi: [
350 { name: 'f_bt_ratio_idle_enable', type: 'checkbox', value: nvram.bt_ratio_idle_enable == '1', suffix: ' ' },
351 { name: 'bt_ratio_idle', type: 'text', maxlen: 10, size: 7, value: nvram.bt_ratio_idle, suffix: ' <small>minutes (range: 1 - 55; default: 30)</small>' } ] },
352 { title: 'Global peer limit', name: 'bt_peer_limit_global', type: 'text', maxlen: 10, size: 7, value: nvram.bt_peer_limit_global, suffix: ' <small>(range: 10 - 1000; default: 150)</small>' },
353 { title: 'Peer limit per torrent', name: 'bt_peer_limit_per_torrent', type: 'text', maxlen: 10, size: 7, value: nvram.bt_peer_limit_per_torrent, suffix: ' <small>(range: 1 - 200; default: 30)</small>' },
354 { title: 'Upload slots per torrent', name: 'bt_ul_slot_per_torrent', type: 'text', maxlen: 10, size: 7, value: nvram.bt_ul_slot_per_torrent, suffix: ' <small>(range: 1 - 50; default: 10)</small>' }
356 </script>
357 </div>
358 <div class='section-title'>Queue torrents</div>
359 <div class='section'>
360 <script type='text/javascript'>
361 createFieldTable('', [
362 { title: 'Downloads queuing', multi: [
363 { name: 'f_bt_dl_queue_enable', type: 'checkbox', value: nvram.bt_dl_queue_enable == '1', suffix: ' ' },
364 { name: 'bt_dl_queue_size', type: 'text', maxlen: 5, size: 7, value: nvram.bt_dl_queue_size, suffix: ' <small>(range: 1 - 30; default: 5) *</small>' }
365 ] },
366 { title: 'Seeds queuing', multi: [
367 { name: 'f_bt_ul_queue_enable', type: 'checkbox', value: nvram.bt_ul_queue_enable == '1', suffix: ' ' },
368 { name: 'bt_ul_queue_size', type: 'text', maxlen: 5, size: 7, value: nvram.bt_ul_queue_size, suffix: ' <small>(range: 1 - 30; default: 5) *</small>' }
371 </script>
372 <ul>
373 <li><b>Downloads queuing</b> - If enabled, this option will limit how many torrents can be downloaded at once.
374 <li><b>Seeds queuing</b> - If enabled, this option will limit how many torrents can be uploaded/seeded at once.
375 </ul>
376 </div>
377 <div class='section-title'>Advanced Settings</div>
378 <div class='section'>
379 <script type='text/javascript'>
380 createFieldTable('', [
381 { title: 'Find more peers using', multi: [
382 { suffix: '&nbsp; DHT &nbsp;&nbsp;&nbsp;', name: 'f_bt_dht', type: 'checkbox', value: nvram.bt_dht == '1' },
383 { suffix: '&nbsp; PEX &nbsp;&nbsp;&nbsp;', name: 'f_bt_pex', type: 'checkbox', value: nvram.bt_pex == '1' },
384 { suffix: '&nbsp; LPD &nbsp;&nbsp;&nbsp;', name: 'f_bt_lpd', type: 'checkbox', value: nvram.bt_lpd == '1' },
385 { suffix: '&nbsp; uTP &nbsp;&nbsp;&nbsp;', name: 'f_bt_utp', type: 'checkbox', value: nvram.bt_utp == '1' }
386 ] },
387 { title: 'Message level', name: 'bt_message', type: 'select', options: [ ['0','None'], ['1','Error'], ['2','Info'], ['3','Debug'] ], value: nvram.bt_message, suffix: ' ' },
388 { title: 'Save settings location', multi: [
389 { name: 'bt_settings', type: 'select', options: [
390 ['down_dir','In the Download directory (Recommended)'],
391 /* JFFS2-BEGIN */
392 ['/jffs','JFFS2'],
393 /* JFFS2-END */
394 /* CIFS-BEGIN */
395 ['/cifs1','CIFS 1'],['/cifs2','CIFS 2'],
396 /* CIFS-END */
397 ['/tmp','RAM (Temporary)'], ['custom','Custom'] ], value: nvram.bt_settings, suffix: ' ' },
398 { name: 'bt_settings_custom', type: 'text', maxlen: 60, size: 40, value: nvram.bt_settings_custom }
399 ] },
400 { title: 'Blocklist', multi: [
401 { name: 'f_bt_blocklist', type: 'checkbox', value: nvram.bt_blocklist == '1', suffix: ' ' },
402 { name: 'bt_blocklist_url', type: 'text', maxlen: 80, size: 80, value: nvram.bt_blocklist_url }
403 ] },
404 null,
405 { title: '<a href="https://trac.transmissionbt.com/wiki/EditConfigFiles" target="_new">Transmission</a><br>Custom configuration', name: 'bt_custom', type: 'textarea', value: nvram.bt_custom }
407 </script>
408 </div>
409 </form>
410 </div>
411 </td></tr>
412 <tr><td id='footer' colspan=2>
413 <form>
414 <span id='footer-msg'></span>
415 <input type='button' value='Save' id='save-button' onclick='save()'>
416 <input type='button' value='Cancel' id='cancel-button' onclick='javascript:reloadPage();'>
417 </form>
418 </div>
419 </td></tr>
420 </table>
421 <script type='text/javascript'>verifyFields(null, 1);</script>
422 </body>
423 </html>