6 <title>QBT_TR(Rename)QBT_TR[CONTEXT=TransferListWidget]
</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 src=
"scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
15 defaultEventType
: "keydown",
17 "Enter": function(event
) {
18 $("renameButton").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();
32 window
.addEventListener("DOMContentLoaded", () => {
33 const name
= new URI().getData("name");
34 // set text field to current value
36 $("rename").value
= name
;
39 $("renameButton").addEventListener("click", (e
) => {
44 const name
= $("rename").value
.trim();
45 if ((name
=== null) || (name
=== ""))
48 const hash
= new URI().getData("hash");
51 url
: "api/v2/torrents/rename",
57 onComplete: function() {
58 window
.parent
.qBittorrent
.Client
.closeWindows();
68 <div style=
"padding: 10px 10px 0px 10px;">
69 <label for=
"rename" style=
"font-weight: bold;">QBT_TR(New name:)QBT_TR[CONTEXT=TransferListWidget]
</label>
70 <input type=
"text" id=
"rename" style=
"width: 99%;">
71 <div style=
"text-align: center; padding-top: 10px;">
72 <input type=
"button" value=
"QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id=
"renameButton">