From fd101214c34cc3f98e2de2e815de421e21d6ae89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org>
Date: Fri, 9 Apr 2021 15:01:13 +0200
Subject: [PATCH] force manual

---
 src/core/js/tour.js | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/core/js/tour.js b/src/core/js/tour.js
index fdea9b1b..7c84a30b 100644
--- a/src/core/js/tour.js
+++ b/src/core/js/tour.js
@@ -404,16 +404,21 @@ var tour = new function () {
             // initialize next/prev buttons
             var nb = $(this.popover.tip).find("button[data-role=next]")
             if (this.get_next()) {
-                nb.on("click", (e) => {
-                    const pn = this.get_next()
-                    pn.activate(true);
-                    if ($("#" + pn.config.id).length == 0) {
-                        sessionStorage["tour-page-open-next"] = pn.config.id;
-                        window.location = pn.config.href
-                    } else {
-                        pn._open();
-                    }
-                });
+                if (this.config.force_manual_action){
+                    nb.toggleClass("disabled", true);
+                    nb.attr("title","Manual action required!")
+                } else {
+                    nb.on("click", (e) => {
+                        const pn = this.get_next()
+                        pn.activate(true);
+                        if ($("#" + pn.config.id).length == 0) {
+                            sessionStorage["tour-page-open-next"] = pn.config.id;
+                            window.location = pn.config.href
+                        } else {
+                            pn._open();
+                        }
+                    });
+                }
             } else {
                 nb.toggleClass("invisible", true);
             }
-- 
GitLab