Enable customizing the save statistics time interval
[qBittorrent.git] / src / webui / www / private / confirmruledeletion.html
blob7c3ad6c1ccff067fb9c383811c5c0e26b1ed0dab
1 <!DOCTYPE html>
2 <html lang="${LANG}">
4 <head>
5 <meta charset="UTF-8">
6 <title>QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]</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 const rules = new URI().getData("rules").split("|");
16 $("cancelBtn").focus();
17 $("cancelBtn").addEventListener("click", (e) => {
18 e.preventDefault();
19 e.stopPropagation();
20 window.parent.MochaUI.closeWindow(window.parent.$("removeRulePage"));
21 });
22 $("confirmBtn").addEventListener("click", (e) => {
23 e.preventDefault();
24 e.stopPropagation();
26 let completionCount = 0;
27 rules.forEach((rule) => {
28 new Request({
29 url: "api/v2/rss/removeRule",
30 method: "post",
31 data: {
32 ruleName: decodeURIComponent(rule)
34 onComplete: (response) => {
35 ++completionCount;
36 if (completionCount === rules.length) {
37 window.parent.qBittorrent.RssDownloader.updateRulesList();
38 window.parent.MochaUI.closeWindow(window.parent.$("removeRulePage"));
41 }).send();
42 });
43 });
44 });
45 </script>
46 </head>
48 <body>
49 <div style="padding: 10px 10px 0px 10px;">
50 <p>QBT_TR(Are you sure you want to remove the selected download rules?)QBT_TR[CONTEXT=AutomatedRssDownloader]</p>
51 <div style="text-align: right;">
52 <input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR[CONTEXT=MainWindow]">
53 <input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]">
54 </div>
55 </div>
56 </body>
58 </html>