Display External IP Address in status bar
[qBittorrent.git] / src / webui / www / private / editwebseed.html
blobacbf49fc7fe734b04febd919316d753306b27e4d
1 <!DOCTYPE html>
2 <html lang="${LANG}">
4 <head>
5 <meta charset="UTF-8">
6 <title>QBT_TR(Edit web seed)QBT_TR[CONTEXT=HttpServer]</title>
7 <link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
8 <script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
9 <script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
10 <script>
11 "use strict";
13 window.addEventListener("DOMContentLoaded", () => {
14 new Keyboard({
15 defaultEventType: "keydown",
16 events: {
17 "Enter": function(event) {
18 $("editWebSeedButton").click();
19 event.preventDefault();
21 "Escape": function(event) {
22 window.parent.qBittorrent.Client.closeWindows();
23 event.preventDefault();
25 "Esc": function(event) {
26 window.parent.qBittorrent.Client.closeWindows();
27 event.preventDefault();
30 }).activate();
32 const origUrl = new URI().getData("url");
33 $("url").value = decodeURIComponent(origUrl);
34 $("url").focus();
36 $("editWebSeedButton").addEvent("click", (e) => {
37 e.stopPropagation();
38 const hash = new URI().getData("hash");
39 new Request({
40 url: "api/v2/torrents/editWebSeed",
41 method: "post",
42 data: {
43 hash: hash,
44 origUrl: origUrl,
45 newUrl: encodeURIComponent($("url").value.trim()),
47 onComplete: () => {
48 window.parent.qBittorrent.Client.closeWindows();
50 }).send();
51 });
52 });
53 </script>
54 </head>
56 <body>
57 <div style="text-align: center;">
58 <br>
59 <label for="url">QBT_TR(Web seed URL:)QBT_TR[CONTEXT=PropertiesWidget]</label>
60 <div style="text-align: center; padding-top: 10px;">
61 <input type="text" id="url" style="width: 90%;">
62 </div>
63 <br>
64 <input type="button" value="QBT_TR(Edit)QBT_TR[CONTEXT=HttpServer]" id="editWebSeedButton">
65 </div>
66 </body>
68 </html>